Fix: balance / bid issues
Balance checking on publish was not working. Channel create didn't have minimum bid check.
This commit is contained in:
parent
23355e6b21
commit
2832880d45
2 changed files with 4 additions and 2 deletions
|
@ -57,7 +57,7 @@ function PublishName(props: Props) {
|
|||
}, [name]);
|
||||
|
||||
useEffect(() => {
|
||||
const totalAvailableBidAmount = previousBidAmount + balance;
|
||||
const totalAvailableBidAmount = previousBidAmount ? previousBidAmount + balance : balance;
|
||||
|
||||
let bidError;
|
||||
if (bid === 0) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import BusyIndicator from 'component/common/busy-indicator';
|
|||
import Button from 'component/button';
|
||||
import analytics from 'analytics';
|
||||
|
||||
import { CHANNEL_NEW, CHANNEL_ANONYMOUS, INVALID_NAME_ERROR } from 'constants/claim';
|
||||
import { CHANNEL_NEW, CHANNEL_ANONYMOUS, MINIMUM_PUBLISH_BID, INVALID_NAME_ERROR } from 'constants/claim';
|
||||
|
||||
type Props = {
|
||||
channel: string, // currently selected channel
|
||||
|
@ -102,6 +102,8 @@ class ChannelSection extends React.PureComponent<Props, State> {
|
|||
newChannelBidError = __('Please decrease your deposit to account for transaction fees');
|
||||
} else if (newChannelBid > balance) {
|
||||
newChannelBidError = __('Deposit cannot be higher than your balance');
|
||||
} else if (newChannelBid < MINIMUM_PUBLISH_BID) {
|
||||
newChannelBidError = __('Your deposit must be higher');
|
||||
}
|
||||
|
||||
this.setState({
|
||||
|
|
Loading…
Reference in a new issue