fix: Fix hardware wallet MMPay on EIP-7702 chains by gating 7702 paths on account keyring capability#8388
fix: Fix hardware wallet MMPay on EIP-7702 chains by gating 7702 paths on account keyring capability#8388
Conversation
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
packages/transaction-pay-controller/src/strategy/across/across-submit.ts
Show resolved
Hide resolved
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
packages/keyring-controller/src/KeyringController-method-action-types.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ 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 59f1152. Configure here.
packages/transaction-pay-controller/src/strategy/across/across-submit.ts
Show resolved
Hide resolved
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |

Explanation
Fix hardware wallet mUSD conversion on EIP-7702 chains by gating 7702 paths on account keyring capability
Summary
KeyringController:accountSupports7702messenger action that checks whether an account's keyring supports EIP-7702 signing (returns true only for HD and simple keyrings, false for hardware wallets like Ledger)useExecuteflag onaccountSupports7702, ensuring the relay API receives non-7702 requests for hardware wallets and returns quotes with proper individual gas limitsauthorizationListandgasLimit7702in relay submission onaccountSupports7702, preventing 7702 batch transaction paths that would failsignEip7702Authorizationon hardware keyringsKeyringControllerAccountSupports7702ActionintoTransactionPayController'sAllowedActionsso the messenger call is available at each decision pointReferences
Checklist
Note
Medium Risk
Medium risk because it changes transaction quoting/submission control flow for Relay/Across (batch vs individual submission and 7702 execute flags), which can affect gas estimation and how transactions are sent for certain accounts/chains.
Overview
Adds
KeyringController:accountSupports7702(and controller method) to determine whether an account’s keyring can sign EIP-7702 authorizations (HD + Simple only), with new action types/exports and unit tests.Updates Transaction Pay Relay and Across strategies to gate all EIP-7702 paths on this capability: disable Relay
useExecute/authorizationListfor unsupported accounts, avoid 7702 batch submission by falling back to individualaddTransactioncalls, and re-estimate Across gas limits individually when a chain reports 7702 but the account can’t sign it. Wires the new action intoAllowedActionsintransaction-controller/transaction-pay-controllerand updates messenger mocks/tests accordingly.Reviewed by Cursor Bugbot for commit 19b4ad7. Bugbot is set up for automated code reviews on this repo. Configure here.