fix: hardware wallet eip 7702 issue (cp-7.71.0)#27615
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
f786fca to
274ac4c
Compare
weitingsun
left a comment
There was a problem hiding this comment.
platform codeowner files lgtm
abretonc7s
left a comment
There was a problem hiding this comment.
LGTM - doesn't seem to touch perps flows.
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.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |




Description
This PR will provide a fix for hardware wallet to gas free network like Monad and Sei.
Due to currently Hardware wallet is not supported for EIP 7702 gas sponsorship, and Swap feature is not working for hardware wallet user.
This fix will fall back the Gasless transaction to User pay gas previous model so that user can still do the swap and sign transaction like bfore.
This is temporately fix for current version of extensions, and we will do a proper support in the future.
Similar to extension PR: MetaMask/metamask-extension#40915
Ticket: https://consensyssoftware.atlassian.net/jira/software/c/projects/NEB/boards/3738/backlog?selectedIssue=NEB-767
Changelog
CHANGELOG entry: Hardware wallet user will fall back to use
User pay gasfor those Gasless network due to hardware wallet not supported in Gasless network like Sei and Monad.Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
Network list:

Tx flow:



After
Network list:

Tx flow:


Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches gasless sponsorship and transaction publishing paths (including 7702 delegation), which can affect whether transactions are sponsored vs user-paid and could change behavior on supported chains. Changes are scoped to hardware-wallet detection gates with added tests, reducing regression risk.
Overview
Hardware wallet accounts now opt out of gasless / EIP-7702 sponsorship, forcing swaps/bridge and confirmations to use the normal user-pays-gas path.
This adds an
accountSupports7702gate toTransactionControllerInitsoDelegation7702PublishHookandisEIP7702GasFeeTokensEnabledonly activate for keyrings that support 7702, and updatesuseIsGaslessSupported/useIsGasIncluded7702Supported(via newuseIsHardwareWalletForBridge) to report unsupported for hardware signers.Network selection UI (
NetworkSelector,NetworkMultiSelectorList,CustomNetwork) now hides the “No network fee” sponsored label for hardware wallets, and a patched@metamask/bridge-status-controllerwaits for approval tx confirmation when required. Tests were added/updated to cover the new hardware-wallet gating behavior.Written by Cursor Bugbot for commit 83f66fc. This will update automatically on new commits. Configure here.