-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: Adding patch on eth-json-rpc-middleware to disable verifyContract field validation for cosmos #27021
Conversation
…ld validation for cosmos
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/[email protected] |
@metamaskbot update-policies |
Policies updated |
Builds ready [b7be78f]
Page Load Metrics (1734 ± 81 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [7bb95d9]
Page Load Metrics (1772 ± 56 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍🏼
I think we can update the description from
Fixes: TODO
to Fixes: https://github.com/MetaMask/metamask-extension/issues/26980
It is worth mentioning that the solution appears to have been carried over from MetaMask/eth-json-rpc-middleware#333 (original), created by @mtsitrin, and applied as a patch.
We are applying this as a patch while continuing to discuss handling the verifyingContract spec. Without the patch, the eth-json-rpc-middleware
enforces verifyingContracts as an Ethereum contract address in hex format. We are patching this to fix uses of cosmos chains using the https://github.com/evmos/ethermint EVM adapter
Builds ready [f2c786d]
Page Load Metrics (1887 ± 61 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #27021 +/- ##
========================================
Coverage 70.15% 70.15%
========================================
Files 1425 1425
Lines 49656 49656
Branches 13892 13892
========================================
Hits 34833 34833
Misses 14823 14823 ☔ View full report in Codecov by Sentry. |
package.json
Outdated
@@ -267,7 +267,8 @@ | |||
"@metamask/nonce-tracker@npm:^5.0.0": "patch:@metamask/nonce-tracker@npm%3A5.0.0#~/.yarn/patches/@metamask-nonce-tracker-npm-5.0.0-d81478218e.patch", | |||
"@metamask/keyring-controller@npm:^16.0.0": "patch:@metamask/keyring-controller@npm%3A17.1.1#~/.yarn/patches/@metamask-keyring-controller-npm-17.1.1-098cb41930.patch", | |||
"@metamask/keyring-controller@npm:^17.1.0": "patch:@metamask/keyring-controller@npm%3A17.1.1#~/.yarn/patches/@metamask-keyring-controller-npm-17.1.1-098cb41930.patch", | |||
"@trezor/connect-web@npm:^9.1.11": "patch:@trezor/connect-web@npm%3A9.3.0#~/.yarn/patches/@trezor-connect-web-npm-9.3.0-040ab10d9a.patch" | |||
"@trezor/connect-web@npm:^9.1.11": "patch:@trezor/connect-web@npm%3A9.3.0#~/.yarn/patches/@trezor-connect-web-npm-9.3.0-040ab10d9a.patch", | |||
"@metamask/eth-json-rpc-middleware@npm:^12.1.1": "patch:@metamask/eth-json-rpc-middleware@npm%3A14.0.1#~/.yarn/patches/@metamask-eth-json-rpc-middleware-npm-14.0.1-b6c2ccbe8c.patch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This forces all usage eth-json-rc-middleware
from v12 to v14. While upgrading to v14 seems good, perhaps most safely done separately and this PR can path onto existing v12 as well as directly used v14?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @legobeat , I removed this line of code.
Builds ready [b7e6c13]
Page Load Metrics (1708 ± 55 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
@metamaskbot update-policies |
Policies updated |
Quality Gate passedIssues Measures |
Builds ready [debeefb]
Page Load Metrics (1641 ± 84 ms)
|
Description
Adding patch on eth-json-rpc-middleware to disable verifyContract field validation for cosmos
Related issues
Fixes: #26980
Manual testing steps
cosmos
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist