Commit ca34dae
chore(runway): cherry-pick fix: mUSD icon was showing up as the linea icon for merkl claims cp-7.77.0 (#30203)
- fix: mUSD icon was showing up as the linea icon for merkl claims
cp-7.77.0 (#30192)
## **Description**
The claim confirmation bottom sheet was displaying the Linea network
icon as the token avatar instead of the mUSD logo.
Root cause: When the TokensController adds mUSD to the user's wallet as
part of the claim flow, it does so without an image URL, the token list
service hasn't hydrated the logo yet. `useTokenAsset` was returning the
wallet token with no image causing `AvatarToken` to fall back to
`NetworkBadgeSource` (ie the linea icon).
- Added an image URL to `MUSD_TOKEN` in` musd.ts` as the single source
of truth for the mUSD logo
- In `useTokenAsset`, use MUSD_TOKEN.image in the no-wallet fallback
asset, and also supplement asset.image when the wallet token exists but
has no image
## **Changelog**
CHANGELOG entry: fix mUSD icon image fallback
## **Related issues**
Fixes: MUSD-798
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user views claim confirm screen
Given the user has some merkl rewards to claim
When user clicks claim on the menu and looks at the claim confirm screen
Then they should see the mUSD icon, not two linea icons
```
## **Screenshots/Recordings**
### **Before**
<img width="1170" height="2532" alt="Simulator Screenshot - iPhone 16e -
2026-05-14 at 16 49 27"
src="https://github.com/user-attachments/assets/5876db00-3b4e-44bf-ab2e-7fb1d596003e"
/>
### **After**
<img width="1170" height="2532" alt="Simulator Screenshot - iPhone 16e -
2026-05-14 at 16 49 18"
src="https://github.com/user-attachments/assets/21f5e8d2-0861-4b25-aed9-606ebfaa2cf8"
/>
## **Pre-merge author checklist**
- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [X] I've included tests if applicable
- [X] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
#### 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](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example
For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).
## **Pre-merge reviewer checklist**
<!--
Reviewer checklist items follow the same semantics as the author
checklist: an
unchecked box is ambiguous, a checked box means the reviewer consciously
assessed that responsibility. See `docs/readme/ready-for-review.md`.
-->
- [ ] 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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk: small, targeted change to confirmation token asset selection
and a constant addition; main risk is unintended icon override for
`musdClaim` if the wallet token has a different image.
>
> **Overview**
> mUSD claim confirmations now reliably display the mUSD token avatar by
adding a canonical remote logo URL (`MUSD_TOKEN.image`) and using it
whenever the wallet token is missing an `image`.
>
> `useTokenAsset` consolidates `musdClaim` handling into an early return
that merges wallet token data with `MUSD_TOKEN` defaults (including
`image`) instead of only falling back when the token is absent. Tests
are updated to assert the new `image` field in the fallback asset.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
8cf85d2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[83b886d](83b886d)
Co-authored-by: Shane T <muldots@gmail.com>1 parent 163141b commit ca34dae
3 files changed
Lines changed: 25 additions & 12 deletions
File tree
- app/components
- UI/Earn/constants
- Views/confirmations/hooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
Lines changed: 17 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
55 | 72 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
0 commit comments