Skip to content

feat(money-account): add real activity to the money account#30175

Open
shane-t wants to merge 13 commits into
mainfrom
MUSD-660-money-account-activity
Open

feat(money-account): add real activity to the money account#30175
shane-t wants to merge 13 commits into
mainfrom
MUSD-660-money-account-activity

Conversation

@shane-t
Copy link
Copy Markdown
Member

@shane-t shane-t commented May 14, 2026

Description

Wires up real transaction data (withdrawals and deposits) to the Money Home activity section and adds a transaction detail sheet.

Changelog

CHANGELOG entry: Add real activity to the money account

Related issues

Fixes: MUSD-660

Manual testing steps

Feature: Money Home activity

  Scenario: user views real deposit activity
    Given the user has a Money account with at least one confirmed deposit
    When the user navigates to Money Home
    Then the activity section shows the deposit with the correct token amount and fiat value

  Scenario: user opens transaction details
    Given a deposit is visible in the Money Home activity list
    When the user taps the activity row
    Then a full-screen bottom sheet slides up showing the transaction details
    And the sheet header displays the correct title (e.g. "Deposit")
    And the user can dismiss the sheet by tapping the close button or swiping down

  Scenario: ETH deposit amount display
    Given the user deposited using ETH as the funding token
    When the deposit appears in the activity list
    Then the primary amount shows a human-readable ETH value (e.g. "+0.000445 ETH")
    And not a scientific-notation or excessive-precision value

Screenshots/Recordings

Before

N/A

After

Simulator Screenshot - iPhone 16e - 2026-05-14 at 13 38 32 Simulator Screenshot - iPhone 16e - 2026-05-14 at 13 38 29

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
Introduces new navigation flow and replaces mocked Money activity data with live TransactionController data; mistakes could hide transactions or break navigation to the details sheet. Display logic changes (amount/fiat formatting, batch tx classification) increase risk of incorrect labeling/amounts across transaction types.

Overview
Money activity now uses real transactions and supports details navigation. useMoneyAccountTransactions switches from returning empty lists to filtering/sorting TransactionController transactions (including EIP-7702 batch nested deposit/withdraw types), while still supporting the mock-data flag via an explicit mockDataEnabled return value.

Tapping Money activity rows in MoneyHomeView and MoneyActivityView now navigates to a new full-screen MoneyTransactionDetailsSheet modal (new route Routes.MONEY.MODALS.TRANSACTION_DETAILS_SHEET), and the old under-construction alert helper is removed.

Row rendering was updated: MoneyActivityItem now passes transactionId through onPress, shows a localized Failed state for failed txs, and useMoneyTransactionDisplayInfo expands label/icon derivation for batch txs and improves primary/fiat amount formatting (including native-token deposits via requiredAssets + usdConversionRate). Tests were updated/added accordingly, plus en.json adds money.transaction.failed.

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

@metamaskbotv2 metamaskbotv2 Bot added the team-mobile-ux Mobile UX team label May 14, 2026
@shane-t shane-t force-pushed the MUSD-660-money-account-activity branch from 32146b9 to 7910ef5 Compare May 14, 2026 10:15
@shane-t shane-t changed the title Musd 660 money account activity feat(money-account): add real activity to the money account May 14, 2026
@shane-t shane-t force-pushed the MUSD-660-money-account-activity branch from d0bcd2b to b5fe784 Compare May 14, 2026 11:48
@github-actions github-actions Bot added size-M and removed size-XL labels May 14, 2026
@shane-t shane-t added team-earn earn and removed team-mobile-ux Mobile UX team labels May 14, 2026
@shane-t
Copy link
Copy Markdown
Member Author

shane-t commented May 14, 2026

@metamaskbot update-mobile-fixture

@github-actions
Copy link
Copy Markdown
Contributor

🔄 Fixture update started. Running workflow from branch MUSD-660-money-account-activity. View workflow runs

@github-actions
Copy link
Copy Markdown
Contributor

E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use skip-smart-e2e-selection label\n- iOS build failed — check the CI workflow for errors\n\nView logs and retry

@shane-t shane-t marked this pull request as ready for review May 14, 2026 12:27
@shane-t shane-t requested a review from a team as a code owner May 14, 2026 12:27
@shane-t shane-t force-pushed the MUSD-660-money-account-activity branch from 9c0ebe7 to 9b6cdfe Compare May 14, 2026 12:41
@github-actions github-actions Bot added size-L and removed size-M labels May 14, 2026
Comment thread app/components/UI/Money/components/MoneyActivityItem/MoneyActivityItem.tsx Outdated
Comment thread app/components/UI/Money/Views/MoneyHomeView/MoneyHomeView.tsx
Comment thread app/components/UI/Money/hooks/useMoneyTransactionDisplayInfo.ts Outdated
Comment thread app/components/UI/Money/hooks/useMoneyTransactionDisplayInfo.ts Outdated
Comment thread app/components/UI/Money/hooks/useMoneyTransactionDisplayInfo.ts
Comment thread app/components/UI/Money/hooks/useMoneyTransactionDisplayInfo.ts Outdated
Comment thread app/components/UI/Money/hooks/useMoneyAccountTransactions.ts
@shane-t shane-t requested a review from a team as a code owner May 15, 2026 08:11
@shane-t shane-t force-pushed the MUSD-660-money-account-activity branch from 976330e to ae93e56 Compare May 15, 2026 09:23
@github-actions github-actions Bot added size-XL and removed size-L labels May 15, 2026
Comment thread app/components/UI/Money/hooks/useMoneyTransactionDisplayInfo.ts Outdated
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 38.84298% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.00%. Comparing base (3751d9a) to head (ae93e56).
⚠️ Report is 225 commits behind head on main.

Files with missing lines Patch % Lines
...s/UI/Money/hooks/useMoneyTransactionDisplayInfo.ts 25.00% 36 Missing and 6 partials ⚠️
...ctionDetailsSheet/MoneyTransactionDetailsSheet.tsx 0.00% 13 Missing ⚠️
...components/MoneyActivityItem/MoneyActivityItem.tsx 0.00% 11 Missing ⚠️
...nts/UI/Money/Views/MoneyHomeView/MoneyHomeView.tsx 0.00% 4 Missing ⚠️
...oney/Views/MoneyActivityView/MoneyActivityView.tsx 0.00% 3 Missing ⚠️
...ents/UI/Money/hooks/useMoneyAccountTransactions.ts 92.85% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (3751d9a) and HEAD (ae93e56). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3751d9a) HEAD (ae93e56)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #30175       +/-   ##
===========================================
- Coverage   81.54%   56.00%   -25.54%     
===========================================
  Files        5343     5437       +94     
  Lines      142128   145201     +3073     
  Branches    32411    33204      +793     
===========================================
- Hits       115899    81323    -34576     
- Misses      18299    57034    +38735     
+ Partials     7930     6844     -1086     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread app/components/UI/Money/hooks/useMoneyTransactionDisplayInfo.ts
Comment thread app/components/UI/Money/hooks/useMoneyTransactionDisplayInfo.ts
@shane-t shane-t requested a review from a team as a code owner May 15, 2026 16:14
@shane-t shane-t requested a review from Jwhiles May 15, 2026 16:37
@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: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 23 changed files are within the Money/Card feature area (app/components/UI/Money/ and related constants/routes). Key changes include:

  1. New MoneyTransactionDetailsSheet component - A new bottom sheet for viewing Money account transaction details, registered as a new route (Routes.MONEY.MODALS.TRANSACTION_DETAILS_SHEET).

  2. Navigation flow change - MoneyActivityView and MoneyHomeView now navigate to the new transaction details sheet when a transaction item is pressed, replacing the previous "under construction" alert. This is a functional change to the Money card activity flow.

  3. useMoneyAccountTransactions hook - Now reads real transactions from TransactionController (filtered to Money account address and EIP-7702 batch transactions) instead of returning empty lists when mock data is disabled. This is a significant behavioral change.

  4. MoneyActivityItem - Updated onPress signature to pass transactionId, added failed transaction state display with red "Failed" text.

  5. Display logic enhancements - useMoneyTransactionDisplayInfo now handles EIP-7702 batch transactions, native token amounts, and source token symbols.

  6. Routes.ts - Added TRANSACTION_DETAILS_SHEET route (minor, scoped to Money modals).

  7. locales/en.json - Added "failed" string for Money transactions.

The changes are entirely scoped to the Money/Card feature. SmokeMoney covers card home, add funds, ramps, and related flows. No other feature areas (confirmations, accounts, network, swaps, etc.) are affected. The Routes.ts change only adds a new Money modal route and doesn't modify existing routes used by other features.

SmokeMoney is the appropriate tag. Per SmokeMoney description, when Card Add Funds flows execute swaps, SmokeSwap and SmokeConfirmations should also be selected - but the changes here don't modify the Add Funds swap path, only the activity/transaction details view. The existing card-home-add-funds.spec.ts test validates the Add Funds flow which is unchanged.

Performance Test Selection:
The changes are scoped to the Money/Card feature's activity view and transaction details. No performance-sensitive code paths are modified - no list rendering changes (the MoneyActivityList component itself is unchanged except for the onItemPress signature), no startup/initialization code, no account/network selectors, and no Redux state management changes that would impact rendering performance. The useMoneyAccountTransactions hook now reads from TransactionController but this is a data-fetching change, not a rendering performance concern. No performance tests are warranted.

View GitHub Actions results

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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 3062aba. Configure here.

Comment thread app/components/UI/Money/constants/activityStyles.ts
Comment thread app/components/UI/Money/hooks/useMoneyAccountTransactions.ts
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants