-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: cp-12.13.0 Disable origin throttling middleware if cause is "rej…
…ectAllApprovals" (#30388) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This PR aims to fix `release-blocker` in `v12.13.0` which disables origin throttling middleware if `cause` is `rejectAllApprovals`. Patch note: Currently bumping `transaction-controller` is blocked because it's breaking e2e tests https://consensys.slack.com/archives/CTQAGKY5V/p1739968847746929?thread_ts=1739869734.799669&cid=CTQAGKY5V To avoid applying version newer version of `transaction-controller` needed change patched in this PR. Required change is already in the core repository MetaMask/core#5355. And will most likely be released in version `46.0.1`. Then we will most likely bump `transaction-controller` in `main`. [](https://codespaces.new/MetaMask/metamask-extension/pull/30388?quickstart=1) ## **Related issues** Fixes: #30333 ## **Manual testing steps** See the task details ## **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/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-extension/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. --------- Co-authored-by: MetaMask Bot <[email protected]>
- Loading branch information
1 parent
468ab8f
commit 42bd11d
Showing
6 changed files
with
101 additions
and
5 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
.yarn/patches/@metamask-transaction-controller-npm-45.0.0-010fef9da6.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,17 @@ | ||
diff --git a/dist/TransactionController.cjs b/dist/TransactionController.cjs | ||
index c96d2962d81c4c63c7b626bc1ca18b196b20a154..236b451e5f94584d4ce42b6bfaf6b7225b8ae7f9 100644 | ||
--- a/dist/TransactionController.cjs | ||
+++ b/dist/TransactionController.cjs | ||
@@ -1152,7 +1152,11 @@ class TransactionController extends base_controller_1.BaseController { | ||
if (!isTxCompleted) { | ||
if (error?.code === rpc_errors_1.errorCodes.provider.userRejectedRequest) { | ||
this.cancelTransaction(transactionId, actionId); | ||
- throw rpc_errors_1.providerErrors.userRejectedRequest('MetaMask Tx Signature: User denied transaction signature.'); | ||
+ throw rpc_errors_1.providerErrors.userRejectedRequest({ | ||
+ message: | ||
+ 'MetaMask Tx Signature: User denied transaction signature.', | ||
+ data: error?.data, | ||
+ }); | ||
} | ||
else { | ||
this.failTransaction(meta, error, actionId); |
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
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
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