polkadot-js / api

Promise and RxJS APIs around Polkadot and Substrate based chains via RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata.
Apache License 2.0
1.07k stars 354 forks source link

Add claimedRewardsEra to api.derive.staking.query for compatibility with legacyClaimedRewards #5862

Closed TarikGul closed 6 months ago

TarikGul commented 6 months ago

Summary

StakingQueryFlags

Now takes in a new flag: withClaimedRewardsEras. This flag returns all the claimedRewards eras based on the new storage entry ClaimedRewards.

api.derive.staking.electedInfo:

Adds a 3rd param for page.

api.derive.staking.query && api.derive.staking.queryMulti

Returns a new field claimedRewardsEras when withClaimedRewardsEras is true. This is for compatibility reasons for legacyClaimedRewards.

Fix api.derive.staking.stakingRewards

Now takes into account claimedRewards storage key to ensure all eras are accounted for.

TODO:

polkadot-js-bot commented 6 months ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.