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

Add signTypedData version validation #201

Merged
merged 1 commit into from
Sep 9, 2021
Merged

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Sep 9, 2021

The Version parameter used by signTypedData-related functions has been converted to an enum, and all version parameters are now validated against this enum.

The TypedDataUtils functions were written specifically for V3 and V4, so V1 is disallowed. If anyone was using these functions with V1, they were effectively using the V3 versions.

@Gudahtt Gudahtt requested a review from a team as a code owner September 9, 2021 12:43
@Gudahtt Gudahtt marked this pull request as draft September 9, 2021 12:46
@Gudahtt
Copy link
Member Author

Gudahtt commented Sep 9, 2021

This depends upon #200

Base automatically changed from remove-sign-typed-data-version-2 to main September 9, 2021 15:47
@Gudahtt Gudahtt marked this pull request as ready for review September 9, 2021 15:50
The `Version` parameter used by `signTypedData`-related functions has
been converted to an enum, and all `version` parameters are now
validated against this enum.

The `TypedDataUtils` functions were written specifically for `V3` and
`V4`, so `V1` is disallowed. If anyone was using these functions with
`V1`, they were effectively using the `V3` versions.
Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

This should have been done from the start. LGTM!

@Gudahtt Gudahtt merged commit 89c9f91 into main Sep 9, 2021
@Gudahtt Gudahtt deleted the add-version-validation branch September 9, 2021 21:29
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.

2 participants