From 89d2df2fa117f33d08f95e6f65c9fa03e4e93838 Mon Sep 17 00:00:00 2001 From: Matthew Walsh Date: Fri, 15 Nov 2024 17:56:14 +0000 Subject: [PATCH] chore(runway): cherry-pick fix: transaction reject crash (#12311) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **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. --- package.json | 5 +++-- ...rs+6.4.0.patch => @metamask+rpc-errors+7.0.1.patch} | 0 yarn.lock | 10 +--------- 3 files changed, 4 insertions(+), 11 deletions(-) rename patches/{@metamask+rpc-errors+6.4.0.patch => @metamask+rpc-errors+7.0.1.patch} (100%) diff --git a/package.json b/package.json index 8a18bbc9acc..b69bf7d39e0 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/patches/@metamask+rpc-errors+6.4.0.patch b/patches/@metamask+rpc-errors+7.0.1.patch similarity index 100% rename from patches/@metamask+rpc-errors+6.4.0.patch rename to patches/@metamask+rpc-errors+7.0.1.patch diff --git a/yarn.lock b/yarn.lock index 329cff1bd62..059abc4ddb1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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/rpc-errors@7.0.1", "@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==