Skip to content

Commit

Permalink
cherry-pick: Updating @metamask/eth-json-rpc-middleware to version 14…
Browse files Browse the repository at this point in the history
….0.1 to fix regression in typed sign requests (#26916)

## **Description**
Type sign signature requests break if verifyingContract is not defined.

## **Related issues**

Fixes: #26908

## **Manual testing steps**

1. Connect to a dapp
2. Ensure that Ethereum Mainnet is the selected chain for that dapp
3. Run this in the console:
```
await window.ethereum.request({
  method: 'eth_signTypedData_v4',
  params: [
    window.ethereum.selectedAddress,
     `{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"Permit":[{"name":"owner","type":"address"},{"name":"spender","type":"address"},{"name":"value","type":"uint256"},{"name":"nonce","type":"uint256"},{"name":"deadline","type":"uint256"}]},"primaryType":"Permit","domain":{"name":"USD Coin","chainId":${1},"version":"2"},"message":{"owner":"${window.ethereum.selectedAddress}","spender":"0x1661F1B207629e4F385DA89cFF535C8E5Eb23Ee3","value":"1033366316628","nonce":1,"deadline":1678709555}}`,
  ],
})
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [X] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
jpuri authored Sep 4, 2024
1 parent 5daf4c4 commit 252176b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"@metamask/design-tokens": "^4.0.0",
"@metamask/ens-controller": "^10.0.1",
"@metamask/eth-json-rpc-filters": "^7.0.0",
"@metamask/eth-json-rpc-middleware": "^14.0.0",
"@metamask/eth-json-rpc-middleware": "^14.0.1",
"@metamask/eth-ledger-bridge-keyring": "^2.0.1",
"@metamask/eth-query": "^4.0.0",
"@metamask/eth-sig-util": "^7.0.1",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5139,9 +5139,9 @@ __metadata:
languageName: node
linkType: hard

"@metamask/eth-json-rpc-middleware@npm:^14.0.0":
version: 14.0.0
resolution: "@metamask/eth-json-rpc-middleware@npm:14.0.0"
"@metamask/eth-json-rpc-middleware@npm:^14.0.1":
version: 14.0.1
resolution: "@metamask/eth-json-rpc-middleware@npm:14.0.1"
dependencies:
"@metamask/eth-block-tracker": "npm:^11.0.1"
"@metamask/eth-json-rpc-provider": "npm:^4.1.1"
Expand All @@ -5154,7 +5154,7 @@ __metadata:
klona: "npm:^2.0.6"
pify: "npm:^5.0.0"
safe-stable-stringify: "npm:^2.4.3"
checksum: 10/1b62b1b2f2cce21cc4d7c4ccaf33024552119f09258cad1af683c317b90a5bbbb33311e3cb22a44913032deb93876ffdcbd591ed0269043af560a7a50a8ea6d9
checksum: 10/39beecb0d2be19854b132fd615aee1f29195602d3db902f52755260b26a2c37c0a91cd635a09d4dc16f922d32bb229003b338228ae29577c5151d880fad04637
languageName: node
linkType: hard

Expand Down Expand Up @@ -25274,7 +25274,7 @@ __metadata:
"@metamask/eslint-config-typescript": "npm:^9.0.1"
"@metamask/eslint-plugin-design-tokens": "npm:^1.1.0"
"@metamask/eth-json-rpc-filters": "npm:^7.0.0"
"@metamask/eth-json-rpc-middleware": "npm:^14.0.0"
"@metamask/eth-json-rpc-middleware": "npm:^14.0.1"
"@metamask/eth-ledger-bridge-keyring": "npm:^2.0.1"
"@metamask/eth-query": "npm:^4.0.0"
"@metamask/eth-sig-util": "npm:^7.0.1"
Expand Down

0 comments on commit 252176b

Please sign in to comment.