Skip to content

fix(confirmations): submit money account withdrawals on Monad - #45563

Draft
jpuri wants to merge 1 commit into
fix/confirmations-money-account-deposit-submitfrom
fix/confirmations-money-account-withdraw-submit
Draft

fix(confirmations): submit money account withdrawals on Monad#45563
jpuri wants to merge 1 commit into
fix/confirmations-money-account-deposit-submitfrom
fix/confirmations-money-account-withdraw-submit

Conversation

@jpuri

@jpuri jpuri commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Make money-account withdrawals (including the default same-token mUSD on Monad path) actually move funds, mirroring the mobile implementation:

  • Treat the Money Keyring as EIP-7702-relay capable. Sponsored withdrawals are externally signed and must publish via the sentinel relay; skipping the relay hook raw-sent an unsigned payload that Monad rejected with "Transaction decoding error".
  • Relay the parent execute() as a single exactExecution delegation like mobile's publish hook, instead of expanding nestedTransactions into a batch redeem that mined without moving funds.
  • Throw (like mobile) when a sponsored or gas-included transaction lands on a chain without EIP-7702 support instead of silently falling through to the unsigned raw send.
  • Approve only funded withdraw batches: re-encode the typed amount at confirm, rebuild the parent batch calldata from the funded nested calls, and log why a submit was refused instead of silently no-oping.
  • Hide result rows for zero withdraw amounts even when a no-op quote is stored.

Changelog

CHANGELOG entry: Fixed money account withdrawals not submitting on Monad

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1816

Manual testing steps

  1. Open a confirmation for a money account withdrawal (mUSD on Monad)
  2. Enter a withdraw amount and confirm
  3. Verify the transaction is submitted via the relay and funds actually move
  4. Verify a zero withdraw amount hides the result rows and the confirm is blocked

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

🤖 Generated with Claude Code

@jpuri
jpuri deployed to pr-comment August 17, 2026 04:31 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

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.

@metamask-ci metamask-ci Bot added the team-confirmations Push issues to confirmations team label Aug 17, 2026
@metamask-ci

metamask-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (42 files, +2268 -186)
  • 📁 app/
    • 📁 scripts/
      • 📁 lib/
        • 📁 transaction/
          • 📁 hooks/
            • 📄 delegation-7702-publish.test.ts +78 -0
            • 📄 delegation-7702-publish.ts +23 -4
            • 📄 delegation.test.ts +50 -0
            • 📄 delegation.ts +13 -1
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 activity/
            • 📁 transaction-details-hero/
              • 📄 transaction-details-hero.test.tsx +64 -6
              • 📄 transaction-details-hero.tsx +42 -4
          • 📁 confirm/
            • 📁 footer/
              • 📄 single-action-footer.test.tsx +128 -4
              • 📄 single-action-footer.tsx +78 -10
          • 📁 developer/
            • 📁 money-account-withdraw-button/
              • 📄 messenger.ts +13 -0
              • 📄 money-account-withdraw-button.test.tsx +48 -33
              • 📄 money-account-withdraw-button.tsx +37 -13
          • 📁 info/
            • 📁 custom-amount-info/
              • 📄 custom-amount-info.test.tsx +68 -1
              • 📄 custom-amount-info.tsx +44 -14
          • 📁 modals/
            • 📁 pay-with-modal/
              • 📄 pay-with-modal.test.tsx +12 -0
              • 📄 pay-with-modal.tsx +5 -2
          • 📁 rows/
            • 📁 from-account-row/
              • 📄 from-account-row.test.tsx +44 -0
              • 📄 from-account-row.tsx +12 -1
        • 📁 hooks/
          • 📁 alerts/
            • 📁 transactions/
              • 📄 useInsufficientBalanceAlerts.test.ts +2 -2
              • 📄 useInsufficientBalanceAlerts.ts +7 -4
              • 📄 useInsufficientMoneyAccountBalanceAlert.test.ts +171 -0
              • 📄 useInsufficientMoneyAccountBalanceAlert.ts +101 -0
              • 📄 constants.ts +1 -0
          • 📁 gas/
            • 📄 useIsGaslessLoading.test.ts +23 -6
            • 📄 useIsGaslessLoading.ts +14 -1
          • 📁 pay/
            • 📄 useIsPaidByMetaMask.test.ts +22 -0
            • 📄 useIsPaidByMetaMask.ts +17 -5
            • 📄 usePayWithNoFeeToken.test.tsx +60 -0
            • 📄 usePayWithNoFeeToken.tsx +38 -7
          • 📁 transactions/
            • 📄 useLastMoneyAccountWithdrawAmount.test.ts +46 -0
            • 📄 useLastMoneyAccountWithdrawAmount.ts +22 -0
            • 📄 useTransactionConfirm.test.ts +238 -1
            • 📄 useTransactionConfirm.ts +324 -49
            • 📄 useTransactionCustomAmount.test.ts +51 -0
            • 📄 useTransactionCustomAmount.ts +39 -5
            • 📄 useTransactionCustomAmountAlerts.test.ts +25 -0
            • 📄 useTransactionCustomAmountAlerts.ts +1 -0
            • 📄 useUpdateTokenAmount.test.ts +44 -1
            • 📄 useUpdateTokenAmount.ts +16 -11
            • 📄 useConfirmationAlerts.test.ts +4 -0
            • 📄 useConfirmationAlerts.ts +5 -0
        • 📁 utils/
          • 📄 transaction-pay.test.ts +168 -0
          • 📄 transaction-pay.ts +70 -1

@jpuri jpuri added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Aug 17, 2026
@jpuri
jpuri force-pushed the fix/confirmations-money-account-deposit-submit branch from f7594c7 to 4d93f51 Compare August 17, 2026 10:05
Make money-account withdrawals (including the default same-token mUSD on
Monad path) actually move funds, mirroring mobile:

- Treat the Money Keyring as EIP-7702-relay capable. Sponsored withdrawals
  are externally signed and must publish via the sentinel relay; skipping
  the relay hook raw-sent an unsigned payload that Monad rejected with
  "Transaction decoding error".
- Relay the parent execute() as a single exactExecution delegation like
  mobile's publish hook, instead of expanding nestedTransactions into a
  batch redeem that mined without moving funds.
- Throw (like mobile) when a sponsored or gas-included transaction lands on
  a chain without EIP-7702 support instead of silently falling through to
  the unsigned raw send.
- Approve only funded withdraw batches: re-encode the typed amount at
  confirm, rebuild the parent batch calldata from the funded nested calls,
  and log why a submit was refused instead of silently no-oping.
- Hide result rows for zero withdraw amounts even when a no-op quote is
  stored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jpuri
jpuri force-pushed the fix/confirmations-money-account-withdraw-submit branch from eb55e66 to 9a9a1c7 Compare August 17, 2026 10:13
@jpuri
jpuri deployed to pr-comment August 17, 2026 10:13 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-XL team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant