fix: dedicated convert mUSD details cp-13.41.0#44586
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. |
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/core-extension-ux (6 files, +137 -56)
|
| * | ||
| * @param hash - The activity item hash | ||
| */ | ||
| export function useTransactionMeta(hash: string | undefined) { |
There was a problem hiding this comment.
extracted from other locally-enriched detail pages
| return <BridgeDetails item={item} />; | ||
| case 'swap': | ||
| case 'convert': | ||
| return <ConvertDetails item={item} />; |
| toEvmCaipChainId(ARBITRUM_USDC.chainId), | ||
| ); | ||
|
|
||
| function useTransactionMeta(hash: string | undefined) { |
There was a problem hiding this comment.
extracted into useLocalTransactionMeta
| >; | ||
| }; | ||
|
|
||
| function useTransactionMeta(hash: string | undefined) { |
There was a problem hiding this comment.
extracted into useLocalTransactionMeta
# Conflicts: # ui/hooks/activity/useCachedEvmTransaction.ts # ui/pages/details/hooks/useCachedEvmTransaction.ts # ui/pages/details/templates/perps-deposit-details.tsx # ui/pages/details/templates/swap-details.tsx # ui/pages/details/templates/template-loader.tsx # ui/pages/details/transaction-details.tsx # ui/pages/details/useCachedEvmTransaction.ts
daa09e3 to
99b9aa4
Compare
| item: Extract< | ||
| ActivityListItem, | ||
| { | ||
| type: |
There was a problem hiding this comment.
convert is currently shared in this union type
Builds ready [d1ac92e]
⚡ Performance Benchmarks (Total: 🟢 15 pass · 🟡 7 warn · 🔴 2 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [17d0dd6]
⚡ Performance Benchmarks (Total: 🟢 15 pass · 🟡 7 warn · 🔴 2 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
17d0dd6 to
ba39d23
Compare
Builds ready [ba39d23]
⚡ Performance Benchmarks (Total: 🟢 12 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [a82b3d1]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| ? nonEvmActivityItems.get(txIdentifier.toLowerCase()) | ||
| : undefined; | ||
|
|
||
| const cachedApiTransaction = useCachedEvmTransaction({ |
There was a problem hiding this comment.
extracted into useApiTransaction
Builds ready [df03a38] [reused from a82b3d1]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [df03a38] [reused from a82b3d1]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [df03a38] [reused from a82b3d1]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [df03a38] [reused from a82b3d1]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Builds ready [7e9c5b2] [reused from a82b3d1]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|


Description
Splits the locally-enriched mUSD conversion from the swap-details template into a dedicated template.
Fixes the empty source token row and adds the transaction steps summary
Changelog
CHANGELOG entry: Fixed the mUSD conversion activity details
Related issues
Fixes: https://consensys.slack.com/archives/C09AYKX30P3/p1784182784586309
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
UI-only activity detail routing and display; no auth or transaction submission changes. Convert details render nothing when local transaction meta is missing.
Overview
convertactivity items now use a dedicatedConvertDetailstemplate instead of sharingSwapDetails, so mUSD-style conversions can show localmetamaskPaydata (USD network fee, total, and step summary) and a Convert again footer without swap-specific fee rows or block explorer.You sent is filled by loading the source chain transaction (
metamaskPay.sourceHash/chainId) via a newuseApiTransactionhook (cache + API query) and deriving the sent amount from value transfers.Shared hooks
useLocalTransactionMetaanduseApiTransactionreplace duplicated local-meta lookup in perps templates and inline fetch logic intransaction-details.Reviewed by Cursor Bugbot for commit 7e9c5b2. Bugbot is set up for automated code reviews on this repo. Configure here.