polkadot-js / apps

Basic Polkadot/Substrate UI for interacting with a Polkadot and Substrate node. This is the main user-facing application, allowing access to all features available on Substrate chains.
https://dotapps.io
Apache License 2.0
1.75k stars 1.55k forks source link

Pending payouts are not displayed in the payout page #11071

Closed Leouarz closed 2 days ago

Leouarz commented 1 week ago

Pending payout should be displayed in the payouts tab. Few weeks ago, the payout section was showing eras already paid. This issue was tracked here It was recently closed, as a fixed was pushed and deployed. Now no eras is shown in the payout page.

Before the fix, the bug was indeed there, eg. in here, eras 212 and 215 are already claimed and still showing: image

After the fix, no era is displayed: image

In comparison, in the staking dashboard, we have this: image

To reproduce, here is the required data on Avail testnet:

Don't hesitate in case you need any other information.

Allowing users to claimed some era rewards or all of them.

TarikGul commented 1 week ago

Interesting, must be a parsing issue in apps. The api now returns a isClaimed field in each of the rewards. I will check this out.

Leouarz commented 1 week ago

Thanks, i saw the isClaimed field being used, and while adding logs in the api, i saw the rewards coming with isClaimed being correctly false, then they are all set tu claimed in this piece of code. I did not went further to be honest

the-nodelab commented 4 days ago

This is also happening with the Tangle RPC (wss://rpc.tangle.tools). Example account is tgGv1ckHJRCzpggcPyZxeyK2T9PugDogZSd9X9q4jFWWZLVJS

TarikGul commented 3 days ago

Thank you @Leouarz for the extra info - it definitely helped narrow it down faster. The problem was indeed that line. PR in the api: https://github.com/polkadot-js/api/pull/6026

Hopefully this will resolve the issue! I need to release it in the api first then propogate it to apps later in the week.

Leouarz commented 3 days ago

Hey @TarikGul, just tested the changes by applying them manually, they seem to work as expected, thank you ! Waiting for the release.