Skip to content

Commit

Permalink
fix: subtract delegated_vesting_shares from available shares (#2047)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekhmet authored Jul 9, 2018
1 parent b57adb3 commit 538989b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/wallet/PowerUpOrDown.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export default class PowerUpOrDown extends React.Component {
const { user, down, totalVestingShares, totalVestingFundSteem } = this.props;

return down
? formatter.vestToSteem(user.vesting_shares, totalVestingShares, totalVestingFundSteem)
? formatter.vestToSteem(
parseFloat(user.vesting_shares) - parseFloat(user.delegated_vesting_shares),
totalVestingShares,
totalVestingFundSteem,
)
: parseFloat(user.balance);
};

Expand Down

0 comments on commit 538989b

Please # to comment.