fix: preserve Money Account EIP-7702 auths on same-chain pay batches - #9765
Open
jpuri wants to merge 5 commits into
Open
fix: preserve Money Account EIP-7702 auths on same-chain pay batches#9765jpuri wants to merge 5 commits into
jpuri wants to merge 5 commits into
Conversation
Pass pre-signed authorizationList through addTransactionBatch when an account override is active, retain those signatures on publish, and merge them with the batch payer upgrade so Monad mUSD vault deposits succeed.
4 tasks
jpuri
enabled auto-merge
August 3, 2026 15:42
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c9dcd37. Configure here.
delegationMock is for the batch payer. When from is already upgraded and only foreign authorizations are provided, do not mock authorizationList[0] onto the sender.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
authorizationListtoTransactionBatchRequestand merge it with the batch payer (from) upgrade authorization when building the type-4 batch transaction.signAuthorizationListinstead of re-signing them withtxParams.from.authorizationListthroughaddTransactionBatchso Money Account vault upgrades are not dropped (CONF-1741 / Monad mUSD deposits).Related to task: https://consensyssoftware.atlassian.net/browse/CONF-1757
Test plan
@metamask/transaction-controller—batch.test.ts/eip7702.test.ts(merge provided auths; retain pre-signed)@metamask/transaction-pay-controller—relay-submit.test.ts(batch gets signed auth list only when same-chain + account override; single-tx path unchanged)Note
Medium Risk
Changes EIP-7702 batch assembly and signing behavior for pay flows; impact is narrowed by account-override gating and tests, but failed auth handling could still break Money Account deposits.
Overview
Fixes same-chain MetaMask Pay relay batches where an EOA pays but the Money Account still needs its own EIP-7702 vault upgrade: those pre-signed authorizations were dropped or re-signed with the wrong account.
Transaction controller:
TransactionBatchRequestgains optionalauthorizationList. Batch building merges the batch payer (from) upgrade auth (when needed) with caller-provided entries on one type-4 tx.signAuthorizationListkeeps fully signed authorizations instead of re-signing withtxParams.from. SecuritydelegationMockstill reflects only the payer upgrade, not foreign auths in the list.Transaction pay controller: On same-chain multi-tx submit with account override (quote
from≠ transactionfrom), the quote’s full signedauthorizationListis forwarded intoaddTransactionBatch; single-tx and non-override paths are unchanged.Reviewed by Cursor Bugbot for commit be660d9. Bugbot is set up for automated code reviews on this repo. Configure here.