Skip to content

Commit

Permalink
Merge pull request #2622 from devinbileck/fix-negative-max-stake-for-…
Browse files Browse the repository at this point in the history
…voting

Fix max available stake for voting showing negative
  • Loading branch information
ManfredKarrer committed Apr 3, 2019
2 parents 8d22d7b + fb9774c commit 6220ff7
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -271,6 +271,8 @@ public void onUpdateBalances(Coin availableConfirmedBalance,
Coin blindVoteFee = BlindVoteConsensus.getFee(daoStateService, daoStateService.getChainHeight());
if (isBlindVotePhaseButNotLastBlock()) {
Coin availableForVoting = availableConfirmedBalance.subtract(blindVoteFee);
if (availableForVoting.isNegative())
availableForVoting = Coin.valueOf(0);
stakeInputTextField.setPromptText(Res.get("dao.proposal.myVote.stake.prompt",
bsqFormatter.formatCoinWithCode(availableForVoting)));
} else
Expand Down

0 comments on commit 6220ff7

Please sign in to comment.