This repository was archived by the owner on Oct 16, 2025. It is now read-only.
[14.x] fix: support ethermint's EIP712 implementation#333
Merged
Gudahtt merged 5 commits intoMetaMask:14.xfrom Oct 2, 2024
Merged
[14.x] fix: support ethermint's EIP712 implementation#333Gudahtt merged 5 commits intoMetaMask:14.xfrom
Gudahtt merged 5 commits intoMetaMask:14.xfrom
Conversation
|
+1 |
1 similar comment
|
+1 |
legobeat
reviewed
Sep 10, 2024
src/wallet.ts
Outdated
| function validateVerifyingContract(data: string) { | ||
| const { domain: { verifyingContract } = {} } = parseTypedMessage(data); | ||
| if (verifyingContract && !isValidHexAddress(verifyingContract)) { | ||
| if (verifyingContract && !(isValidHexAddress(verifyingContract) || verifyingContract == 'cosmos')) { |
Contributor
There was a problem hiding this comment.
Suggested change
| if (verifyingContract && !(isValidHexAddress(verifyingContract) || verifyingContract == 'cosmos')) { | |
| if (verifyingContract && !isValidHexAddress(verifyingContract) && verifyingContract !== 'cosmos') { |
Needs adjusting of types as well.
(FWIW: The linting can also be run locally by yarn lint and yarn build, and tests by yarn test)
Contributor
Author
7 tasks
Member
Gudahtt
approved these changes
Oct 2, 2024
Gudahtt
approved these changes
Oct 2, 2024
Gudahtt
added a commit
that referenced
this pull request
Oct 2, 2024
* Request validation should not throw if verifyingContract is not defined in typed signature (#328) (#330) * 14.0.1 (#331) * [14.x] fix: support ethermint's EIP712 implementation (#333) * setting cosmos as allowed string for verifyingContract field * fixed and linter * readability * Update condition to match main branch * Remove duplicate copy of test --------- Co-authored-by: Jyoti Puri <jyotipuri@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Version 14.0.2 (#339) * Version 14.0.2 * Fix typo Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com> --------- Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com> --------- Co-authored-by: Jyoti Puri <jyotipuri@gmail.com> Co-authored-by: Michael Tsitrin <114929630+mtsitrin@users.noreply.github.com> Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>
Member
|
This has been published as |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
MM is broken since v12.1.1 for cosmos chains that use
https://github.com/evmos/ethermintas EVM adapter.Ethermintuses hard coded"cosmos"string as theVerifyingContractfield, which is broken sincevalidateVerifyingContractwas introduced in MM.This PR adds support to allow "cosmos" as the
VerifyingContractvalue.