Skip to content

Commit

Permalink
chore(runway): cherry-pick fix: transaction reject crash (#12311)
Browse files Browse the repository at this point in the history
## **Description**

Rejecting a transaction confirmation caused the app to crash.

This was due to Hermes not supporting the recursive nature of the error
`stack` during serialisation.

Resolution:

- Force the use of `7.0.1` of `@metamask/rpc-errors` since there are no
API breaking changes.
- Update the pre-existing patch to target this new version.

## **Related issues**

Fixes: #12240 

## **Manual testing steps**

See issue.

## **Screenshots/Recordings**

### **Before**

### **After**

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.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
- [x] 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-mobile/blob/main/.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
matthewwalsh0 committed Nov 15, 2024
1 parent bd155dd commit 89d2df2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@
"micromatch": "4.0.8",
"send": "0.19.0",
"ethereumjs-util/**/secp256k1": "3.8.1",
"**/secp256k1": "4.0.4"
"**/secp256k1": "4.0.4",
"**/@metamask/rpc-errors": "7.0.1"
},
"dependencies": {
"@consensys/on-ramp-sdk": "1.28.5",
Expand Down Expand Up @@ -175,7 +176,7 @@
"@metamask/react-native-payments": "^2.0.0",
"@metamask/react-native-search-api": "1.0.1",
"@metamask/react-native-webview": "^14.0.4",
"@metamask/rpc-errors": "^6.4.0",
"@metamask/rpc-errors": "^7.0.1",
"@metamask/scure-bip39": "^2.1.0",
"@metamask/sdk-communication-layer": "0.29.0-wallet",
"@metamask/selected-network-controller": "^15.0.2",
Expand Down
File renamed without changes.
10 changes: 1 addition & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5329,15 +5329,7 @@
escape-string-regexp "^4.0.0"
invariant "2.2.4"

"@metamask/rpc-errors@^6.0.0", "@metamask/rpc-errors@^6.2.1", "@metamask/rpc-errors@^6.3.1", "@metamask/rpc-errors@^6.4.0":
version "6.4.0"
resolved "https://registry.yarnpkg.com/@metamask/rpc-errors/-/rpc-errors-6.4.0.tgz#a7ce01c06c9a347ab853e55818ac5654a73bd006"
integrity sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg==
dependencies:
"@metamask/utils" "^9.0.0"
fast-safe-stringify "^2.0.6"

"@metamask/rpc-errors@^7.0.1":
"@metamask/[email protected]", "@metamask/rpc-errors@^6.0.0", "@metamask/rpc-errors@^6.2.1", "@metamask/rpc-errors@^6.3.1", "@metamask/rpc-errors@^7.0.1":
version "7.0.1"
resolved "https://registry.yarnpkg.com/@metamask/rpc-errors/-/rpc-errors-7.0.1.tgz#0eb2231a1d5e6bb102df5ac07f365c695bf70055"
integrity sha512-EeQGYioq845w2iBmiR9LHYqHhYIaeDTmxprHpPE3BTlkLB74P0xLv/TivOn4snNLowiC5ekOXfcUzCQszTDmSg==
Expand Down

0 comments on commit 89d2df2

Please sign in to comment.