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

/accounts/{accountId}/staking-info The return of this interface is changed (The key claimedRewards that returns the result becomes legacyClaimedRewards), why is this? #1433

Open
wangtao19911111 opened this issue Apr 24, 2024 · 1 comment · May be fixed by #1445
Assignees

Comments

@wangtao19911111
Copy link

Description

/accounts/{accountId}/staking-info The return of this interface is changed
(The key claimedRewards that returns the result becomes legacyClaimedRewards), why is this?

Steps to Reproduce

[Provide detailed steps for someone else to reproduce your bug.]

Expected vs. Actual Behavior

[A clear description of what you expected to happen and what actually happened.]

@Imod7
Copy link
Contributor

Imod7 commented Apr 24, 2024

This is due to one of the changes mentioned in this PR :

StakingLedger.claimed_rewards, renamed to StakingLedger.legacy_claimed_rewards.

The reason of the renaming is because the use of StakingLedger.legacy_claimed_rewards is being deprecated and will be removed.

This directly impacts Sidecar's staking-info endpoint where all information found in StakingLedger is returned without any validation on specific fields, as seen here. Hence, as soon as the last runtime upgrade (v1.2.0) was enacted and the change took effect :

  • on Kusama (era 6514 (Apr 18)) and
  • Polkadot (era 1420 (Apr 21))
    (eras and dates mentioned in this PR)

it also resulted in the renaming of the field in Sidecar's response.

I will check the code in detail tomorrow and keep you updated of any related fixes.

@Imod7 Imod7 linked a pull request Jun 4, 2024 that will close this issue
16 tasks
@Imod7 Imod7 self-assigned this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants