-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding patch on eth-json-rpc-middleware to disable verifyContract fie…
…ld validation for cosmos
- Loading branch information
Showing
3 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
.yarn/patches/@metamask-eth-json-rpc-middleware-npm-14.0.1-b6c2ccbe8c.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/dist/wallet.js b/dist/wallet.js | ||
index fce8272ab926443df4c5971c811664f849791425..9237ffcaaea2260e01182feecec667b10edd35a0 100644 | ||
--- a/dist/wallet.js | ||
+++ b/dist/wallet.js | ||
@@ -293,7 +293,7 @@ exports.createWalletMiddleware = createWalletMiddleware; | ||
*/ | ||
function validateVerifyingContract(data) { | ||
const { domain: { verifyingContract } = {} } = (0, normalize_1.parseTypedMessage)(data); | ||
- if (verifyingContract && !(0, utils_1.isValidHexAddress)(verifyingContract)) { | ||
+ if (verifyingContract && verifyingContract !== 'cosmos' && !(0, utils_1.isValidHexAddress)(verifyingContract)) { | ||
throw rpc_errors_1.rpcErrors.invalidInput(); | ||
} | ||
} |
This file contains 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
This file contains 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