Skip to content

feat(card): link Money Account from Card Home and refresh linkage UX#30452

Merged
Brunonascdev merged 3 commits into
mainfrom
feat/mm-card-home-money-account-cta
May 20, 2026
Merged

feat(card): link Money Account from Card Home and refresh linkage UX#30452
Brunonascdev merged 3 commits into
mainfrom
feat/mm-card-home-money-account-cta

Conversation

@Brunonascdev

@Brunonascdev Brunonascdev commented May 20, 2026

Copy link
Copy Markdown
Contributor

Description

Reason: Users with a MetaMask Card and a Money Account need clearer paths to link spending to their Money balance, copy that matches design (including mUSD cashback and flexible APY), and less noisy linkage feedback. Card Home previously lacked a dedicated entry point; the link confirmation sheet used generic art and older copy.

Solution:

  • Card Home: When useMoneyAccountCardLinkage reports canLink, render a MoneyMetaMaskCard in link mode between dividers, with hideCardImage so the hero card image is not duplicated, apy from useMoneyAccountBalance, and metal vs virtual cashback via CardType. Tapping the header, subtitle row, or Link card calls startLinkFlow({ screen: Routes.CARD.HOME }). CTA stays visible while cardHomeDataStatus is loading (stale-while-revalidate) when other conditions still allow linking.
  • MoneyMetaMaskCard (link mode): Support hideCardImage (vertical bullets only), and when apy is undefined, use link_subtitle_no_apy and omit the APY bullet instead of forcing 0%.
  • MoneyLinkCardSheet: Replace the mUSD coin with the user’s card art from selectCardHomeData (mm_card_metal for CardType.METAL, else mm_card_regular), Figma-aligned sizing, updated sheet description plus link_card_sheet_description_no_apy when vault APY is not yet available.
  • useMoneyAccountCardLinkage: Single-line pending/success toasts, updated error copy, pending spinner color IconDefault, and error icon Error instead of Danger.
  • Spending Limit (from feat(card): preselect Money Account and add Spend and Earn CTA on spending limit screen #30320): Money Account preselection, Spend and Earn promo UI (SpendAndEarnPromoCard, ShimmerOverlay), and related useSpendingLimit / view tests.
  • Other (same branch vs main): Bridge insufficient-native reserve handling and tests; send confirmation alert modal and fee / percentage amount hook adjustments with tests.

Changelog

CHANGELOG entry: Added a Link Money Account section on Card Home, redesigned the link-card bottom sheet (card art and copy), improved Money Account card-linkage toasts, extended Spending Limit with Spend and Earn / Money preselection, and tightened bridge and send confirmation edge cases.

Related issues

Fixes:

Refs: #30320

Manual testing steps

Feature: Money Account linking and related card flows

  Scenario: Card Home shows link CTA when user can link
    Given I am a cardholder with Money Account requirements met, card home data loaded, and I am not already delegated for card spending
    When I open Card Home
    Then I see the Link MetaMask Card block with dividers and Link card action

  Scenario: Link card opens confirmation sheet with correct art and copy
    Given I tap Link card or the link header from Card Home (or open the link sheet from the Money link flow)
    When the Spend and earn bottom sheet appears
    Then I see the title Spend and earn, description mentioning mUSD back and up to my vault APY when available, and the card image matches my card type (metal vs virtual)

  Scenario: Confirm link still runs linkage after sheet dismiss
    Given the link confirmation sheet is open
    When I tap Link card on the sheet
    Then the sheet closes and the in-app linkage flow continues (pending then success or error toast)

  Scenario: No APY yet uses shorter description
    Given vault APY is not yet available to the client
    When I open the link confirmation sheet
    Then the body copy does not include an APY clause and no raw i18n placeholders appear

  Scenario: Spending Limit Spend and Earn promo (Refs #30320)
    Given I open Spending Limit under conditions where the Spend and Earn promo applies
    When I review the screen
    Then I see the promo treatment and Money Account is preselected where configured

Screenshots/Recordings

Before

N/A

After

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-05-20.at.11.58.13.mov

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.

Note

Medium Risk
Moderate risk: introduces new Money Account linking CTA paths and conditional rendering on Card Home, plus updates toast/copy logic that could affect linkage UX and user navigation if conditions are wrong.

Overview
Adds a Money Account linking entry point on Card Home: when useMoneyAccountCardLinkage().canLink is true, Card Home renders a MoneyMetaMaskCard “link” section (with dividers), passes live apy from useMoneyAccountBalance, detects metal vs virtual via CardType, and routes all presses to startLinkFlow({ screen: Routes.CARD.HOME }).

Refines the linking UX and copy: MoneyMetaMaskCard now supports hideCardImage (Card Home variant) and switches to no-APY subtitle/bullets when APY is unavailable; MoneyLinkCardSheet swaps the illustration to card art based on selectCardHomeData and uses no-APY description when needed. Updates linkage toasts in useMoneyAccountCardLinkage (single-line pending/success, new error copy/icon/spinner color) and refreshes/enhances tests and i18n strings accordingly.

Reviewed by Cursor Bugbot for commit 3128d05. Bugbot is set up for automated code reviews on this repo. Configure here.

@Brunonascdev Brunonascdev self-assigned this May 20, 2026
@Brunonascdev Brunonascdev requested review from a team as code owners May 20, 2026 14:56
@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 pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the team-card Card Team label May 20, 2026
@Brunonascdev Brunonascdev removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
All 11 changed files are scoped to the MetaMask Card and Money feature area:

  1. CardHome.tsx - Adds a new "Link Money Account" CTA section to the Card Home screen, integrating MoneyMetaMaskCard component when canLinkMoneyAccount is true.
  2. useMoneyAccountCardLinkage.tsx - UI polish: removes description text from toast states, changes spinner/icon colors.
  3. MoneyLinkCardSheet.tsx - Replaces mUSD coin image with card images (regular/metal), adds APY-less description fallback, uses Redux selector for card type.
  4. MoneyMetaMaskCard.tsx - Adds hideCardImage prop, handles apy as undefined with APY-less copy fallback, refactors LinkContent.
  5. MoneyLinkCardSheet.styles.ts - Renames style key and sets fixed card image dimensions.
  6. locales/languages/en.json - Adds new strings for APY-less copy, updates pending/success/error toast strings.
  7. Test files - Unit test updates for the above changes.

The SmokeMoney tag directly covers Card home screen, navbar entry, Add Funds flows, and card analytics — exactly the area being modified. No changes touch shared navigation, confirmations, or other feature areas. No other tags are warranted as the changes are isolated to Card/Money UI components.

Performance Test Selection:
The changes are UI/UX improvements to the Card/Money linking flow — updating copy, images, and conditional rendering of a CTA section. There are no changes to list rendering, heavy state management, data loading pipelines, or app initialization that would impact performance metrics. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@Brunonascdev Brunonascdev added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 75e45df May 20, 2026
130 of 134 checks passed
@Brunonascdev Brunonascdev deleted the feat/mm-card-home-money-account-cta branch May 20, 2026 19:20
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-L team-card Card Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants