Repository navigation
feat(confirmations): support Money Account withdrawals to hardware wallet recipients - #47111
Conversation
…et recipients Remove moneyAccountWithdraw from the hardware-blocked pay types and let the withdraw recipient selector return any EVM account, including hardware and QR accounts. The recipient is only encoded into the transfer calldata; the money account (txParams.from) remains the only signer. Co-authored-by: Daniel <dan437@users.noreply.github.com>
…are recipient signature Pay submits quote transactions from the quote request account, which is the withdraw recipient. Show a blocking alert and refuse to approve when a non-trivial quote would require a hardware recipient to sign. Co-authored-by: Daniel <dan437@users.noreply.github.com>
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (7 files, +388 -46)
👨🔧 @MetaMask/earn (4 files, +197 -21)
📜 @MetaMask/policy-reviewers (8 files, +56 -24)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🧪 @MetaMask/qa (2 files, +15 -0)
|
Builds ready [4cd116d]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 4 warn · 🔴 3 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…hdrawals Quoted withdrawals will be sent and signed by the Money Account, so a hardware or QR recipient no longer needs a signature. Remove the blocking alert and the confirm refusal. Co-authored-by: Daniel <dan437@users.noreply.github.com>
…m the Money Account Temporary yarn patch for @metamask/transaction-pay-controller@30.0.0. It adds the opt-in isAccountOverrideRecipientOnly config so a post-quote transaction is quoted and submitted from its own from, and accountOverride only receives the output. Co-authored-by: Daniel <dan437@users.noreply.github.com>
Mark the withdraw recipient as recipient-only so Pay quotes and submits from the Money Account. For a quoted receive token, the nested transfer keeps the mUSD on the Money Account so it can be bridged. Re-encode the transfer when the receive token changes. Co-authored-by: Daniel <dan437@users.noreply.github.com>
…toasts A quoted withdrawal transfers the mUSD to the Money Account itself, so that transfer does not name the destination. Co-authored-by: Daniel <dan437@users.noreply.github.com>
…g quote path Only hardware and QR recipients use isAccountOverrideRecipientOnly. A software recipient still quotes and signs the Relay deposit itself, which keeps working when Relay does not return an execute quote. The flag and transfer target now follow recipient changes too. Co-authored-by: Daniel <dan437@users.noreply.github.com>
…-hardware-recipient-e741 # Conflicts: # package.json # yarn.lock Co-authored-by: Daniel <dan437@users.noreply.github.com>
Builds ready [450edd2]
⚡ Performance Benchmarks (Total: 🟢 10 pass · 🟡 1 warn · 🔴 2 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…-hardware-recipient-e741 Co-authored-by: Daniel <dan437@users.noreply.github.com>
Builds ready [7e3a2c6]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 5 warn · 🔴 2 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…-hardware-recipient-e741 Co-authored-by: Daniel <dan437@users.noreply.github.com>
Builds ready [15aae4c]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 3 warn · 🔴 2 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…-hardware-recipient-e741 # Conflicts: # package.json # yarn.lock Co-authored-by: Daniel <dan437@users.noreply.github.com>
Builds ready [d400ba5]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 3 warn · 🔴 4 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…ecipient Send reads the recipient from the store at confirm time instead of the last render, and a quoted withdrawal with no recipient set must still keep the mUSD on the money account. Picking a withdraw recipient now only sets the override; the background re-encodes the transfer, so the transfer and the override cannot disagree in between.
Builds ready [d4fb91e]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 3 warn · 🔴 4 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…-hardware-recipient-e741 Co-authored-by: Daniel <dan437@users.noreply.github.com> # Conflicts: # app/scripts/messenger-client-init/transaction-pay-controller-init.ts
Builds ready [944bf8f]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 3 warn · 🔴 2 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
Co-authored-by: Daniel <dan437@users.noreply.github.com>
Co-authored-by: Daniel <dan437@users.noreply.github.com>
Builds ready [dcf5c65]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 4 warn · 🔴 3 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…-hardware-recipient-e741 Co-authored-by: Daniel <dan437@users.noreply.github.com>
Builds ready [c6e9c5a]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 2 warn · 🔴 4 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…-hardware-recipient-e741 Co-authored-by: Daniel <dan437@users.noreply.github.com>
Builds ready [921d970]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 1 warn · 🔴 3 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…-hardware-recipient-e741 Co-authored-by: Daniel <dan437@users.noreply.github.com>
31.0.0 quotes post-quote withdrawals from the transaction's own `from`, which this branch relies on. It also dedupes gas-fee-controller to 27.1.0, so the LavaMoat policies pick up its newer uuid. Co-authored-by: Daniel <dan437@users.noreply.github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Builds ready [226e861]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 4 warn · 🔴 3 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
|
jpuri
left a comment
There was a problem hiding this comment.
Approving policy file changes as they are not adding any new packages.
|
No release label on PR. Adding release label release-13.57.0 on PR, as PR was added to branch 13.57.0 when release was cut. |



Description
This lets users withdraw from a Money Account to any hardware wallet account (Ledger, Trezor, Lattice, QR, OneKey), including withdrawals that need a quote to another token or chain. The Money Account signs everything and the recipient only receives the funds, so the device never needs to be connected, unlocked, or asked to sign.
@metamask/transaction-pay-controlleris now bumped to^31.0.0, which ships MetaMask/core#10992: post-quote withdrawals are quoted and submitted from the transaction's ownfrom(the Money Account), andaccountOverrideonly receives the output. To match, a quoted withdrawal keeps the mUSD on the Money Account, while same-chain mUSD still pays the recipient directly. Its success toast says "your account", and the withdraw E2E mocks a gasless Relay execute quote, which is how the Money Account submits.Checked for the bump from 30.3.1 to 31.0.0:
from, andaccountOverrideis only the recipient.clientIdis left unset.transaction-controllerstays on the repo's72.3.0resolution, and the pay controller calls the same transaction controller actions as 30.3.1.gas-fee-controllerdedupes to 27.1.0, so the LavaMoat policies pick up its neweruuid.Changelog
CHANGELOG entry: Added support for withdrawing from a Money Account to hardware wallet accounts
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/CONF-2087
Manual testing steps
Pre-merge author checklist
Pre-merge reviewer checklist
Note
High Risk
Changes withdrawal calldata, Pay quote routing, and confirm approval guards—incorrect transfer targets or reuse logic could send funds to the wrong address or approve stale batches.
Reviewed by Cursor Bugbot for commit 921d970. Bugbot is set up for automated code reviews on this repo. Configure here.