Repository navigation
fix: cp-7.60.2 overwrite account upgrade in metamask pay - #23521
Merged
Merged
Conversation
Add unit tests.
OGPoyraz
previously approved these changes
Dec 2, 2025
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
OGPoyraz
previously approved these changes
Dec 2, 2025
Contributor
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsFallback: AI analysis did not complete successfully. Running all tests. |
OGPoyraz
approved these changes
Dec 2, 2025
|
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
When generating delegation data for the
TransactionPayController, overwrite any existing EIP-7702 delegation if not supported.Also bump the controller version to include missing authorization lists on Predict deposit source transactions, when payment token is on Polygon.
Changelog
CHANGELOG entry: Fixed bugs causing failed Perps and Predict deposits due to unsupported or missing account upgrades
Related issues
Fixes: #23494 #23514
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Refactors delegation to correctly build/overwrite EIP-7702 authorizations with validation, integrates Transaction Pay and Delegation 7702 hooks into publish flow, and bumps transaction-related controllers.
TransactionPayPublishHookandDelegation7702PublishHookwith fallback logic before smart transactions.isEIP7702GasFeeTokensEnabled,publicKeyEIP7702, andgetNextNoncehelper.getNetworkStatevianetworkController.state.app/util/transactions/delegation.ts):buildAuthorizationListto useisAtomicBatchSupportedresult per-chain, throwing on unsupported chains and missingupgradeContractAddress.AuthorizationList.delegation.test.tswith cases for already upgraded, different upgrade target, signing calls, and error paths; updates snapshot name.@metamask/transaction-controllerto62.4.0and@metamask/transaction-pay-controllerto^10.3.0(and associated@metamask/network-controllerpeer to^27).Written by Cursor Bugbot for commit 923e879. This will update automatically on new commits. Configure here.