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: update eraElectionStatus for runtime upgrade v30 #485

Merged
merged 11 commits into from
Mar 29, 2021

Conversation

TarikGul
Copy link
Member

This PR resolves issue #468.

Updated eraElectionStatus to work for parachains, but also to work with the upcoming runtime upgrade.

With the upcoming runtime Upgrade v30, eraElectionStatus will no longer be supported and therefore deprecated.

@TarikGul
Copy link
Member Author

@dvdplm Awesome I switched the conditional around to remove the try catch, I agree that it is way better now.

Copy link
Contributor

@emostov emostov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core logic looks good but I think the electionStatus field should be left out or marked deprecated, not just the status sub property.

docs/src/openapi-v1.yaml Outdated Show resolved Hide resolved
src/services/pallets/PalletsStakingProgressService.ts Outdated Show resolved Hide resolved
src/services/pallets/PalletsStakingProgressService.ts Outdated Show resolved Hide resolved
src/services/pallets/PalletsStakingProgressService.ts Outdated Show resolved Hide resolved
TarikGul and others added 6 commits March 23, 2021 14:18
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
@emostov emostov requested a review from dvdplm March 24, 2021 23:17
Comment on lines +14 to +18
| {
status: AnyJson;
toggleEstimate: string | null;
}
| string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dq: What do the |s do here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So here we have a Union Type, the first | denotes that the type has not yet been decided but it will guaranteed be one of the following below. And all following |'s are there to allow electionStatus to fulfill multiple types.

@emostov emostov merged commit 415f030 into master Mar 29, 2021
@emostov emostov deleted the tarik-update-election branch March 29, 2021 17:25
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.

3 participants