Add checks for 0 and exact balance
Otherwise, you get an ugly "internal error"
This commit is contained in:
parent
9a3e251359
commit
9bcb75e234
1 changed files with 10 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue