-
Notifications
You must be signed in to change notification settings - Fork 150
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
Conversation
@dvdplm Awesome I switched the conditional around to remove the |
There was a problem hiding this 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.
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>
| { | ||
status: AnyJson; | ||
toggleEstimate: string | null; | ||
} | ||
| string; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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.