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

fix: define query param depth in Staking Payouts for all chains #1422

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

Imod7
Copy link
Contributor

@Imod7 Imod7 commented Apr 1, 2024

Closes #1421

Description

In #1415 a new variable isKusama was added to ensure that Kusama specific calculations are activated / taking effect only if we are connected to the Kusama chain.
However, with this change the variable sanitizedDepth was left undefined if

  • the query param depth had a valid value and
  • we were connected to any other chain

The reason is this line of code:

if (depth && isKusama) {
	sanitizedDepth = Math.min(Number(depth), currentEra - 518).toString();
}

where sanitizedDepth is defined only is depth has a value and we are connected to the Kusama chain.

Added a small fix to correct this.

@Imod7 Imod7 merged commit c73c801 into master Apr 1, 2024
15 checks passed
@Imod7 Imod7 deleted the domi-fix-depth branch April 1, 2024 16:53
@Imod7 Imod7 mentioned this pull request Apr 24, 2024
This pull request was closed.
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 this pull request may close these issues.

staking-payouts depth is ignored on Polkadot
3 participants