hive-keychain/hive-keychain-extension

[Bug] Hive Engine total token value adding total unstaking tokens in full+staked

Closed this issue · 1 comments

Just found that here:

parseFloat(balance.pendingUnstake) +

The amount is negligible if very small so I never noticed, but when I unstaked all of the balance, I noticed this. Where it adds 75% more value in this case (for a 4-period unstaking token).

I think the best to do here, is to NOT sum the total pending unstaking, and instead calculate the total using the "period amount unstaking" (that is not visible on the staked amount anymore).

When periods advance, the total staked tokens will further reduce and add up with the already in liquid.

Pics (tested with version 3.1.4):
image

image

CC @cedricguillas

Thanks for referencing the issue, it has been fixed and will be pushed in the live prod version