Skip to content

feat: [MUSD-1021] show musd back transactions in money activity cp-8.0.0#32004

Merged
shane-t merged 6 commits into
mainfrom
john-musd-1021
Jun 19, 2026
Merged

feat: [MUSD-1021] show musd back transactions in money activity cp-8.0.0#32004
shane-t merged 6 commits into
mainfrom
john-musd-1021

Conversation

@Jwhiles

@Jwhiles Jwhiles commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

This PR updates the money activity list to show musdback transactions. It assumes a particular type for the transactions, which has not been confirmed by the accounts team yet. In the interest of speed, we plan to merge this and then make a cherry pick PR if the type needs to be changed.

Changelog

CHANGELOG entry: show cashback transactions in money activity

Related issues

Fixes: musd-1021

Manual testing steps

Feature: money activity
  Scenario: user has cashback transactions that land in their money account
    Given user has cashback transactions that land in their money account

    When user looks at the money activity
    Then they see the transactions

Screenshots/Recordings

Before

n/a

After

Screenshot 2026-06-19 at 11 04 54 Screenshot 2026-06-19 at 11 05 04 Screenshot 2026-06-19 at 11 05 28

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
Touches money activity merging, API transaction-type assumptions (METAMASK_CARD_CASHBACK), and navigation for activity details; wrong parsing or bucketing could mislabel deposits vs transfers, though changes are well tested.

Overview
Money activity now treats Accounts API data as card spends and cashback (mUSD back) instead of card-only rows. Parsing accepts METAMASK_CARD_CASHBACK, types use AccountsApiActivity with kind: 'card' | 'cashback', and list rows go through AccountsApiActivityItem with shared display helpers.

Filtering and merging move into useMoneyActivityItems: home and full activity views share the same buckets (cashback in Deposits, card spends in Transfers), mock QA data includes a sample cashback row, and merge logic dedupes by hash with stable sort tie-breaks.

Details UX replaces the card bottom sheet and confirmations CardTransactionDetails with MoneyApiActivityDetailsView on the existing card-details route (activity param). Copy branches for spend vs earned amounts and counterparty rows; the modal sheet route is removed.

Tests and copy follow the rename (useMoneyAccountApiActivity, parseAccountsApiActivity) and add coverage for cashback filtering and the new details screen.

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

@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 pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-XL labels Jun 18, 2026
@Jwhiles Jwhiles force-pushed the john-musd-1021 branch 2 times, most recently from ec0d90c to f103920 Compare June 18, 2026 15:26
@Jwhiles Jwhiles marked this pull request as ready for review June 18, 2026 15:26
@Jwhiles Jwhiles requested a review from a team as a code owner June 18, 2026 15:26
@Jwhiles Jwhiles 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 Jun 18, 2026
@Jwhiles Jwhiles changed the title feat: [MUSD-1021] show cashback transactions in money activity feat: [MUSD-1021] show musd back transactions in money activity Jun 18, 2026
Kureev
Kureev previously approved these changes Jun 18, 2026
@github-actions github-actions Bot added the risk:medium AI analysis: medium risk label Jun 18, 2026
@Jwhiles Jwhiles added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Jun 18, 2026
@Jwhiles Jwhiles enabled auto-merge June 18, 2026 16:47
shane-t
shane-t previously approved these changes Jun 18, 2026
@shane-t shane-t changed the title feat: [MUSD-1021] show musd back transactions in money activity feat: [MUSD-1021] show musd back transactions in money activity cp-8.0.0 Jun 18, 2026
@Matt561 Matt561 self-requested a review June 18, 2026 18:10
Matt561
Matt561 previously approved these changes Jun 18, 2026
@Jwhiles Jwhiles added this pull request to the merge queue Jun 18, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jun 18, 2026
@shane-t shane-t dismissed stale reviews from Matt561 and themself via 3ef5407 June 18, 2026 19:03
@shane-t shane-t requested a review from Matt561 June 18, 2026 19:03
@shane-t shane-t enabled auto-merge June 18, 2026 19:04
Matt561
Matt561 previously approved these changes Jun 18, 2026
@shane-t shane-t requested a review from a team as a code owner June 18, 2026 19:12
@github-actions github-actions Bot added risk:low AI analysis: low risk and removed risk:medium AI analysis: medium risk labels Jun 18, 2026
Comment thread locales/languages/en.json
Comment on lines +7227 to +7230
"cashback": "mUSD back",
"card": "Card",
"purchase": "Purchase",
"musd_back": "mUSD back",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it intentional to have both "cashback" and "musd_back" with the same message ?

Comment thread locales/languages/en.json
},
"card_details": {
"title": "Card transaction",
"api_activity_details": {

@ffmcgee725 ffmcgee725 Jun 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

card_details is replaced with api_activity_details, but CardTransactionDetails component (still registered in MainNavigator.js) continues to reference the old keys.

ex.: line 119

        title={strings('money.card_details.title')}

This will produce visible broken text in production if anyone navigates to the confirmations card-detail screen.

The test likely doesn't catch this because strings() is mocked.

Comment thread app/constants/navigation/Routes.ts Outdated
EARN_CRYPTO_INFO_SHEET: 'MoneyEarnCryptoInfoSheet',
TRANSACTION_DETAILS_SHEET: 'MoneyTransactionDetailsSheet',
API_ACTIVITY_DETAILS_SHEET: 'MoneyApiActivityDetailsSheet',
CARD_TRANSACTION_DETAILS_SHEET: 'MoneyCardTransactionDetailsSheet',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We now only reference API_ACTIVITY_DETAILS_SHEET, so CARD_TRANSACTION_DETAILS_SHEET is dead code I believe ?

fiatAmount,
isIncoming,
icon: IconName.Card,
status: 'confirmed',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is hardcoding to confirmed here intentional ?

@ffmcgee725 ffmcgee725 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also noticed this PR silently reverses #31908 's navigation architecture
#31908 main UX contribution for card transactions was: replace the bottom sheet with a full-screen CardTransactionDetails view.

This reverses this unintentionally I believe.

After this PR: AccountsApiActivityItem → new bottom sheet (MoneyApiActivityDetailsSheet at Routes.MONEY.MODALS.API_ACTIVITY_DETAILS_SHEET)
This means the full-screen CardTransactionDetails screen from #31908 becomes orphaned, while remaining registered in MainNavigator.js but nothing navigates to it.

I believe this is an oversight. Either way it deserves explicit discussion since PR #31908 specifically moved to full-screen.

@github-actions github-actions Bot added risk:medium AI analysis: medium risk and removed risk:low AI analysis: low risk labels Jun 19, 2026
@matthewwalsh0 matthewwalsh0 requested a review from dan437 June 19, 2026 11:01
@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: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR is entirely focused on the Money/Card feature area. Key changes include:

  1. Type refactoring: CardTransactionAccountsApiActivity (discriminated union supporting card and cashback kinds), enabling cashback rewards to surface alongside card spends in the activity list.

  2. New unified details view: MoneyApiActivityDetailsView replaces both CardTransactionDetails (deleted) and MoneyCardTransactionDetailsSheet (deleted), consolidating card spend and cashback detail screens into one full-screen view.

  3. Navigation wiring: MainNavigator.js now routes Routes.MONEY.CARD_TRANSACTION_DETAILS to MoneyApiActivityDetailsView instead of the old CardTransactionDetails. The modal route CARD_TRANSACTION_DETAILS_SHEET was removed from MoneyModalStack.

  4. Hook consolidation: useMoneyAccountCardTransactionsuseMoneyAccountApiActivity; useMoneyActivityItems now returns bucketed data (MoneyActivityBuckets) instead of a flat list, with cashback items routed to the Deposits bucket and card spends to Transfers.

  5. Component renames: CardActivityItemAccountsApiActivityItem, cardItemaccountsApiItem.

  6. Localization: New strings for cashback/mUSD back activity labels.

All changes are scoped to app/components/UI/Money/ and related navigation/routes. The SmokeMoney tag covers Card home, add funds, and ramps flows — exactly the area affected. No other feature areas (confirmations, swap, stake, network, accounts, identity) are impacted by these changes.

Performance Test Selection:
The changes are entirely within the Money/Card activity display layer — type refactoring, component renames, and a new details view. There are no changes to performance-sensitive paths like app launch, login, onboarding, asset loading, swap execution, or account list rendering. No performance test tags are warranted.

View GitHub Actions results

@Jwhiles

Jwhiles commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Also noticed this PR silently reverses #31908 's navigation architecture #31908 main UX contribution for card transactions was: replace the bottom sheet with a full-screen CardTransactionDetails view.

This reverses this unintentionally I believe.

After this PR: AccountsApiActivityItem → new bottom sheet (MoneyApiActivityDetailsSheet at Routes.MONEY.MODALS.API_ACTIVITY_DETAILS_SHEET) This means the full-screen CardTransactionDetails screen from #31908 becomes orphaned, while remaining registered in MainNavigator.js but nothing navigates to it.

I believe this is an oversight. Either way it deserves explicit discussion since PR #31908 specifically moved to full-screen.

Looks like this happened when we merged master. I've now rebased again, and I think that the modals are now behaving as per your changes.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.89796% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.42%. Comparing base (4e34bc5) to head (6e5b192).
⚠️ Report is 67 commits behind head on main.

Files with missing lines Patch % Lines
...ctivityDetailsView/MoneyApiActivityDetailsView.tsx 90.00% 1 Missing and 3 partials ⚠️
app/components/UI/Money/utils/accountsApi.ts 95.23% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #32004      +/-   ##
==========================================
+ Coverage   83.37%   83.42%   +0.05%     
==========================================
  Files        5816     5834      +18     
  Lines      151922   152899     +977     
  Branches    35741    36125     +384     
==========================================
+ Hits       126662   127556     +894     
- Misses      16588    16597       +9     
- Partials     8672     8746      +74     

☔ View full report in Codecov by Harness.
📢 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.

@sonarqubecloud

Copy link
Copy Markdown

@shane-t shane-t added this pull request to the merge queue Jun 19, 2026
Merged via the queue into main with commit c7b940c Jun 19, 2026
98 of 99 checks passed
@shane-t shane-t deleted the john-musd-1021 branch June 19, 2026 14:54
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk:medium AI analysis: medium risk size-XL skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-earn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants