Why is already_withdrawn = to_withdraw - withdrawn?
That should be the quantity which is not withdrawn yet and which is missing yet.
(That's the number we use at the moment).
If I do a math.min on that with the withdraw_rate the available quantity doubles and we're already displaying too much.
A bit more detail of our calc:
store.powerOwned = parseInt( result[ 0 ].vesting_shares.split( " " )[ 0 ] );
store.powerDelegated = parseInt( result[ 0 ].delegated_vesting_shares.split( " " )[ 0 ] );
store.powerReceived = parseInt( result[ 0 ].received_vesting_shares.split( " " )[ 0 ] );
store.poweringDown = parseInt( (result[ 0 ].to_withdraw - result[ 0 ].withdrawn) / 1000000 )
store.votingPower = result[ 0 ].voting_power / 10000;
RE: Help us fix a DLease Bug - 200 BUILDTEAM + 200 STEEM Bounty