nftstaking
nftstaking copied to clipboard
Claim and earningInfo() not working properly
Hello NFTs rewards isn't working properly, when you stake id 4 and 5, and ID 4 have let's say 10 tokens of rewards, but ID 5 have 1 token and you claim 4 and 5 rewards, it only sends to you 1 token instead of 11 and then both go to 0 to start counting again. The same happens with earningInfo function, in this case it will only show 1 token of reward calling ["4","5"].
yes, i come accross this issue too.
Line 103 and 130 should be earned += rewardmath / 100;
I was having the same issue. Havent actually checked to make sure, but checking the code it looks like you need to accumulate the earnings otherwise earning will just be the last token id. So it needs to be earning += instead of just earning =