diff --git a/src/renderer/component/publishForm/internal/channelSection.jsx b/src/renderer/component/publishForm/internal/channelSection.jsx index b36c1b317..db0b040b1 100644 --- a/src/renderer/component/publishForm/internal/channelSection.jsx +++ b/src/renderer/component/publishForm/internal/channelSection.jsx @@ -57,6 +57,16 @@ class ChannelSection extends React.PureComponent { return; } + if (newChannelBid === 0) { + this.refs.newChannelName.showError(__('Bid value must be greater than 0.')); + + return; + } + if (newChannelBid === balance) { + this.refs.newChannelName.showError(__('Please decrease your bid to account for transaction fees.')); + + return; + } this.setState({ creatingChannel: true, diff --git a/src/renderer/component/publishForm/view.jsx b/src/renderer/component/publishForm/view.jsx index 4f770a803..b07f6083f 100644 --- a/src/renderer/component/publishForm/view.jsx +++ b/src/renderer/component/publishForm/view.jsx @@ -61,15 +61,6 @@ class PublishForm extends React.PureComponent { } handleSubmit() { - const { balance } = this.props; - const { bid } = this.state; - - if (bid > balance) { - this.handlePublishError({ message: 'insufficient funds' }); - - return; - } - this.setState({ submitting: true, });