Skip to content

fix(confirmations): hide irrelevant alerts on money account transactions - #45572

Draft
jpuri wants to merge 1 commit into
feat/confirmations-money-account-withdraw-balance-alertfrom
feat/money-account-suppress-irrelevant-alerts
Draft

fix(confirmations): hide irrelevant alerts on money account transactions#45572
jpuri wants to merge 1 commit into
feat/confirmations-money-account-withdraw-balance-alertfrom
feat/money-account-suppress-irrelevant-alerts

Conversation

@jpuri

@jpuri jpuri commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Money account deposits and withdrawals were showing two confirmation alerts that are not relevant to them:

  • "Different account selected" (useSelectedAccountAlerts): money account flows are wallet-initiated and always sent from the dedicated money account, which is never the selected account group — so this warning fired on every money account transaction as noise.
  • "Unnecessary permission" (useMultipleApprovalsAlerts): MetaMask Pay flows (money account deposits/withdrawals, perps, mUSD) batch their own approvals internally. This mirrors mobile's MM_PAY_TRANSACTION_TYPES skip in useBatchedUnusedApprovalsAlert.

Changes

  • useSelectedAccountAlerts: skip the alert when the confirmation is a money account transaction (via getMoneyAccountTransactionType).
  • useMultipleApprovalsAlerts: skip the alert when the confirmation contains a PAY_TRANSACTION_TYPES transaction, matching mobile parity.
  • Tests for both hooks covering money account deposit/withdraw (and perps deposit for the approvals alert).

Related issues

Fixes: CONF-1822

Manual testing steps

  1. Open the money account page and start an "Add funds" (deposit) or withdraw flow.
  2. Confirm the transaction screen no longer shows the "Different account selected" or "Unnecessary permission" alerts.
  3. Verify both alerts still appear for regular dapp batch transactions with unused approvals / mismatched accounts.

🤖 Generated with Claude Code

@jpuri
jpuri deployed to pr-comment August 17, 2026 09:28 — 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 (4 files, +86 -4)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 hooks/
          • 📁 alerts/
            • 📁 transactions/
              • 📄 useMultipleApprovalsAlerts.test.ts +37 -0
              • 📄 useMultipleApprovalsAlerts.ts +12 -1
              • 📄 useSelectedAccountAlerts.test.ts +27 -1
              • 📄 useSelectedAccountAlerts.ts +10 -2

@jpuri
jpuri force-pushed the feat/confirmations-money-account-withdraw-balance-alert branch from 602c006 to 3ae3ee1 Compare August 17, 2026 10:15
Money account deposits/withdrawals showed two alerts that do not apply
to them:

- "Different account selected": these flows are wallet-initiated and
  always sent from the dedicated money account, which is never the
  selected account group, so the warning always fired as noise.
- "Unnecessary permission": pay flows batch their own approvals
  internally; mirrors mobile's MM_PAY_TRANSACTION_TYPES skip in
  useBatchedUnusedApprovalsAlert.

Fixes CONF-1822

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jpuri
jpuri force-pushed the feat/money-account-suppress-irrelevant-alerts branch from bad6d95 to 57aa70f Compare August 17, 2026 10:16
@jpuri
jpuri deployed to pr-comment August 17, 2026 10:16 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant