diff --git a/js/page/publish.js b/js/page/publish.js index 377172999..09ec990fc 100644 --- a/js/page/publish.js +++ b/js/page/publish.js @@ -10,7 +10,7 @@ var publishNumberStyle = { }; var PublishPage = React.createClass({ - _requiredFields: ['name', 'file', 'meta_title', 'meta_author', 'meta_license', 'meta_description'], + _requiredFields: ['name', 'file', 'bid', 'meta_title', 'meta_author', 'meta_license', 'meta_description'], handleSubmit: function() { this.setState({ @@ -85,11 +85,10 @@ var PublishPage = React.createClass({ if (this.state.isFee) { lbry.getNewAddress((address) => { - metadata.fee = { - 'LBC': { - amount: parseFloat(this.state.fee), - address: address, - }, + metadata.fee = {}; + metadata.fee[this.state.feeCurrency] = { + amount: parseFloat(this.state.feeAmount), + address: address, }; doPublish(); @@ -104,6 +103,8 @@ var PublishPage = React.createClass({ return { name: '', bid: '', + feeAmount: '', + feeCurrency: '', nameResolved: false, claimValue: 0.0, fileInfo: null, @@ -156,9 +157,14 @@ var PublishPage = React.createClass({ bid: event.target.value, }); }, - handleFeeChange: function(event) { + handleFeeAmountChange: function(event) { this.setState({ - fee: event.target.value, + feeAmount: event.target.value, + }); + }, + handleFeeCurrencyChange: function(event) { + this.setState({ + feeCurrency: event.target.value, }); }, handleFileChange: function(event) { @@ -266,7 +272,7 @@ var PublishPage = React.createClass({

Bid Amount

- Credits + Credits
How much would you like to bid for this name? { !this.state.nameResolved ? Since this name is not currently resolved, you may bid as low as you want, but higher bids help prevent others from claiming your name. : You must bid over {lbry.formatCredits(this.state.claimValue)} credits to claim this name. } @@ -280,11 +286,19 @@ var PublishPage = React.createClass({ { this.handleFeePrefChange(false) } } checked={!this.state.isFee} /> No fee
-
How much would you like to charge for this file?
+
+

How much would you like to charge for this file?

+ If you choose to price this content in dollars, the number of credits charged will be adjusted based on the value of LBRY credits at the time of purchase. +