From 9bcb75e2343529439ede42861236df91382e461c Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Thu, 15 Mar 2018 02:44:44 -0400 Subject: [PATCH] Add checks for 0 and exact balance Otherwise, you get an ugly "internal error" --- .../component/publishForm/internal/channelSection.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/renderer/component/publishForm/internal/channelSection.jsx b/src/renderer/component/publishForm/internal/channelSection.jsx index b36c1b317..32e390bdb 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,