feat: [MUSD-1021] show musd back transactions in money activity cp-8.0.0#32004
Conversation
|
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. |
ec0d90c to
f103920
Compare
| "cashback": "mUSD back", | ||
| "card": "Card", | ||
| "purchase": "Purchase", | ||
| "musd_back": "mUSD back", |
There was a problem hiding this comment.
Is it intentional to have both "cashback" and "musd_back" with the same message ?
| }, | ||
| "card_details": { | ||
| "title": "Card transaction", | ||
| "api_activity_details": { |
There was a problem hiding this comment.
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.
| EARN_CRYPTO_INFO_SHEET: 'MoneyEarnCryptoInfoSheet', | ||
| TRANSACTION_DETAILS_SHEET: 'MoneyTransactionDetailsSheet', | ||
| API_ACTIVITY_DETAILS_SHEET: 'MoneyApiActivityDetailsSheet', | ||
| CARD_TRANSACTION_DETAILS_SHEET: 'MoneyCardTransactionDetailsSheet', |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
Is hardcoding to confirmed here intentional ?
ffmcgee725
left a comment
There was a problem hiding this comment.
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.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
All changes are scoped to Performance Test Selection: |
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 Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
|



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
Screenshots/Recordings
Before
n/a
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
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 useAccountsApiActivitywithkind: 'card' | 'cashback', and list rows go throughAccountsApiActivityItemwith 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
CardTransactionDetailswithMoneyApiActivityDetailsViewon the existing card-details route (activityparam). 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.