Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Make version-specific signTypedData methods private#84

Merged
Gudahtt merged 2 commits intomainfrom
make-versioned-sign-type-data-methods-private
Jul 13, 2021
Merged

Make version-specific signTypedData methods private#84
Gudahtt merged 2 commits intomainfrom
make-versioned-sign-type-data-methods-private

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Jul 8, 2021

The methods for a specific version of signTypedData are now private. The signTypedData method accepts an options parameter that allows using a specific version, and in practice this is the only method called in MetaMask anyway.

@Gudahtt Gudahtt requested a review from a team as a code owner July 8, 2021 23:01
@Gudahtt Gudahtt force-pushed the make-versioned-sign-type-data-methods-private branch 2 times, most recently from cb3995a to dc66aa4 Compare July 9, 2021 01:21
rekmarks
rekmarks previously approved these changes Jul 12, 2021
Copy link
Copy Markdown
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.

LGTM!

@Gudahtt Gudahtt force-pushed the make-versioned-sign-type-data-methods-private branch from c14af0a to a3e6b20 Compare July 12, 2021 19:09
@Gudahtt
Copy link
Copy Markdown
Member Author

Gudahtt commented Jul 12, 2021

Rebased to resolve conflicts

Edit: Rebased to resolve conflicts again

The methods for a specific version of `signTypedData` are now private.
The `signTypedData` method accepts an `options` parameter that allows
using a specific version, and in practice this is the only method
called in MetaMask anyway.
@Gudahtt Gudahtt force-pushed the make-versioned-sign-type-data-methods-private branch from a3e6b20 to 7acf8b9 Compare July 12, 2021 19:54
The `opts` parameter for the version-specific `signTypedData` functions
is now guaranteed to be truthy, because the functions are now private
and only called internally. The default value for `opts` has been
removed to improve our unit test branch coverage.
@Gudahtt Gudahtt merged commit fbaba65 into main Jul 13, 2021
@Gudahtt Gudahtt deleted the make-versioned-sign-type-data-methods-private branch July 13, 2021 12:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants