Revert SNIP-12 code to be compatible with starknet.js #667
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.
Since the bug found in starknet.js has not yet been fixed (and probably won't be), we'll revert the correct code to the "wrong" way to be compatible with other libraries and dapps until they fix this.
A version called
v0.8.0-snip12
will be created without this PR for backward compatibility, giving users time to migrate to the default implementation (this one) that will focus on compatibility with other libraries.Ref: starknet-io/starknet.js#1278
Ref: starknet-io/starknet.js#1292
Starknet.js testcases: https://github.com/starknet-io/starknet.js/blob/e77fcc78b4e14bd0d8beb207451e998ebe6331a4/__tests__/utils/typedData.test.ts
Also, it adds new test cases regarding nested enums.