Open Tim-TheToolmanTaylor opened 10 months ago
Thanks @Tim-TheToolmanTaylor we will add this to the calculation
Please correct me if I am wrong here.
Yes, your observation of current calculation is correct.
Great, ty @vm06007 Btw, super excited about the wise lending work + arbitrum deploys coming up. Keep up the great work 💪
Describe the bug Currently, the total WISE for a given account connected to the web app will only show WISE counts from direct WISE stakes, and will not account for WISE staked in "Advanced Stakes" because Advanced Stakes are directly owned by the WS-NFT contract (the staker maintains complete control).
Screenshot:
To Reproduce Steps to reproduce the behavior:
Expected behavior Total WISE should remain the same, and accrued interest on advanced stakes should also be added to 'Total:' just the same as normal WISE stakes
Desktop (please complete the following information):
Additional context Presumably, today the app goes to:
0x66a0f676479Cee1d7373f3DC2e2952778BfF5bd6
and checks liquid balance withWiseToken.balanceOf(addr)
+ all staked WISE by looping through all the stakes, generating the stakeID withWiseToken.generateID(addr, stakeCount[addr], 0x01)
, Then calculatedstakedAmount + RewardAmount for(i = WiseToken.stakeCount(addr) )
Please correct me if I am wrong here. If this is the case, then you would just have to add on to this. You would query the WiseStaking-NFTs address:
0xf863a603501fcd30f56dffcb6700a25effefbe94
you would callWS-NFTs.WalletOfOwner(addr)
to get the token IDs, call:WS-NFTs.NFTStake(tokenId)
and do thisfor(WS-NFTs.balanceOf(addr) )
then call back to the original WISE Token contract with:WiseToken.stakes(0xf863a603501fcd30f56dffcb6700a25effefbe94, {bytes16_Value_From_WS-NFTs.NFTStake} )