fix: Allow sudo for polkadot indexed proxy enum #3286
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rel: paritytech/substrate-api-sidecar#461
Starting with @polkadot/api v3.11.1 decoding of old blocks with the sudo proxy no longer works. I think the issue may have been introduced with pull #3194, which commented out the
SudoBalances
variant.Here is an example that breaks with api versions >= 3.11.1:
I was not actually able to figure out how to test this PR directly (I was trying to import the package from my local branch but couldn't figure out how to get it to cooperate with the workspaces), but I did find that adding
to the api initialization fixed the issue and had the above example working properly, so I assumed doing the same in types-known would have an identical effect. From my understanding of the SCALE codec it should be fine to have the
SudoBalances
variant defined for all the runtime versions so I did not think there needed to be a historical version of the type defined, (but I maybe I am missing some edge cases?)Feel free to push to this branch or close if it's not the appropriate fix.