polkadot-cloud / polkadot-staking-dashboard

Fully Featured Dashboard for Staking and Nomination Pools on Polkadot.
http://staking.polkadot.cloud
GNU General Public License v3.0
157 stars 166 forks source link

[Bug] A claimable payout may be not displayed #2213

Open Leouarz opened 3 weeks ago

Leouarz commented 3 weeks ago

Hey,

If for the same era there are multiple claimable payouts for the same user and the first one has been claimed, the next one won't be shown in the modal.

The issue comes from this piece of code : https://github.com/polkadot-cloud/polkadot-staking-dashboard/blob/main/src/contexts/Payouts/index.tsx#L253-L303

Especially in this line, even if the first unclaimed payout is zero, j should be incremented and the next validator should be checked.

Hopefully I understood the code correctly, I can also open a PR if necessary. Don't hesitate if you need more info.

rossbulat commented 3 weeks ago

Thanks for reporting and even suggesting the bug in code @Leouarz! Please allow us a bit of time to investigate.