Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from Apr 23, 2024

Conversation

TarikGul
Copy link
Member

@TarikGul TarikGul commented Apr 23, 2024

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:

  • Get the observable working in query
  • Fix claimedRewards in stakerRewards
  • Fix electedInfo

@TarikGul TarikGul added the WIP Work in Progress label Apr 23, 2024
@TarikGul TarikGul added -auto and removed WIP Work in Progress labels Apr 23, 2024
@polkadot-js-bot polkadot-js-bot merged commit b4ebdc2 into master Apr 23, 2024
6 checks passed
@polkadot-js-bot polkadot-js-bot deleted the tg-staking-claimedRewards branch April 23, 2024 18:06
@polkadot-js-bot
Copy link

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.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants