feat: perps / predict withdraw support money account as recipient#30734
Conversation
…ask-mobile into money_acc_section
…ken for deposit using money account
…ask-mobile into money_acc_updates
…ask-mobile into money_acc_updates
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 df1f549. Configure here.
…k/metamask-mobile into perps_withdraw_money_acc
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #30734 +/- ##
=======================================
Coverage 82.86% 82.86%
=======================================
Files 5570 5570
Lines 143557 143578 +21
Branches 33299 33302 +3
=======================================
+ Hits 118960 118982 +22
+ Misses 16629 16627 -2
- Partials 7968 7969 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokeMoney is selected because these changes directly affect the Card/Money Account Add Funds (Deposit) and withdraw flows, which are core SmokeMoney scenarios. SmokeConfirmations is selected because:
No other tags are needed as the changes are scoped to Money Account/Card functionality and the confirmation layer, with no impact on swaps, staking, network management, accounts, or other areas. Performance Test Selection: |

Description
Perps and predict withdraw support money account as recipient
Changelog
CHANGELOG entry:
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1406
Manual testing steps
Screenshots/Recordings
Screen.Recording.2026-05-29.at.11.12.53.AM.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
High Risk
Changes how money-account payment override builds on-chain deposit/withdraw batches and delegation payloads, which are security- and funds-critical paths.
Overview
Enables perps/predict withdraw flows to treat the money account as the payout destination by extending
PaymentOverride.MoneyAccountthrough post-quote confirmation and pay-token selection.Confirmation UI: The money-account pay row now uses the withdraw “receive as” label when applicable (aligned with the interactive pay row).
Pay token logic:
MoneyAccountoverride no longer excludes post-quote transactions—switching to money account re-selects MUSD on Monad, including when a preferred token was set formoneyAccountWithdrawpost-quote.Payment override data: Withdraw paths build calldata via
buildMoneyAccountWithdrawBatch(vault config, provider, rounded MUSD amount) instead of the legacy withdraw helper. WhentransactionData.isPostQuoteis set, the callback builds a deposit batch (buildMoneyAccountDepositBatch) and returns recipient, authorizationList, and delegation calls so funds land in the primary money account.Reviewed by Cursor Bugbot for commit 8db79e6. Bugbot is set up for automated code reviews on this repo. Configure here.