Skip to content

feat: add max support for selected source tokens#31682

Open
jpuri wants to merge 6 commits into
mainfrom
max_enabled
Open

feat: add max support for selected source tokens#31682
jpuri wants to merge 6 commits into
mainfrom
max_enabled

Conversation

@jpuri

@jpuri jpuri commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

For money deposits add max support for selected source tokens.

Changelog

CHANGELOG entry:

Related issues

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

Manual testing steps

NA

Screenshots/Recordings

NA

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

@jpuri jpuri requested a review from a team as a code owner June 15, 2026 06:58
@jpuri jpuri added team-confirmations Push issues to confirmations team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Jun 15, 2026
@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.

@github-actions github-actions Bot added the risk:medium AI analysis: medium risk label Jun 15, 2026
@jpuri jpuri enabled auto-merge June 15, 2026 07:03
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeConfirmations, SmokeMoney
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR introduces a new noNetworkFeeChains feature flag and a useMoneyDepositNoFee hook that suppresses insufficient balance/pay-token alerts and modifies the Max button behavior for money account deposit/withdraw transactions on no-fee chains.

Key changes:

  1. Feature flag selector (selectMetaMaskPayFlags): Adds noNetworkFeeChains field — affects all consumers of this selector in pay/money flows.
  2. useMoneyDepositNoFee hook (new): Determines if a money deposit/withdraw is fee-free based on chain or token.
  3. useInsufficientBalanceAlert: Suppresses alert when isMoneyNoFee=true — directly affects confirmation alert display.
  4. useInsufficientPayTokenBalanceAlert: Suppresses source-network insufficient balance alert when isMoneyNoFee=true.
  5. useTransactionCustomAmount: Prevents auto-setting max for money account deposits (new behavior).
  6. custom-amount-info.tsx: Shows Max button when isMoneyDepositNoFee=true even if hasMax is false.

SmokeConfirmations is required because the changes directly modify confirmation alert hooks and the custom amount info UI component used in transaction confirmations.

SmokeMoney is required because the changes are specifically about MetaMask Money/Card deposit flows — the moneyAccountDeposit and moneyAccountWithdraw transaction types, the no-fee chain feature flag, and the Max button behavior in the money deposit UI.

The test file changes are unit test updates only (adding noNetworkFeeChains: [] to mocks) — no new E2E test infrastructure changes.

No performance-sensitive code paths are affected (no rendering loops, no heavy computation, no asset loading changes).

Performance Test Selection:
The changes are focused on alert suppression logic and UI button visibility for money deposit/withdraw flows. No performance-sensitive code paths are affected — no rendering loops, no heavy asset loading, no app launch or onboarding flows. Performance tests are not warranted.

View GitHub Actions results

@matthewwalsh0 matthewwalsh0 self-requested a review June 15, 2026 08:55
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 risk:medium AI analysis: medium risk size-M team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant