Commit f41df4d
committed
chore(runway): cherry-pick fix: fix recipient account icons cp-7.60.0 (#23362)
## **Description**
The icon being used for each recipient addresses was not re-using their
account group icons (we use the EVM address of a multichain account
group as the seed of account's icons).
This PR fixes this while keeping the original `recipient.address` as a
fallback (which should never happen anyway).
## **Changelog**
CHANGELOG entry: Fix account's icons for send flows
## **Related issues**
Fixes:
- #22806
## **Manual testing steps**
```gherkin
Feature: Send non-EVM token
Scenario: user starts a send flow for Solana
Given the user has funds
When user selects the recipient address
Then he should see the same icons than the one used for the account list
```
## **Screenshots/Recordings**
### **Before**
https://github.com/user-attachments/assets/100969c2-15e9-49c4-a2f3-cd24aac8e839
<img width="382" height="192" alt="Screenshot 2025-11-27 at 13 28 36"
src="https://github.com/user-attachments/assets/53225dd9-8e47-4788-850e-09579c312e96"
/>
<img width="377" height="250" alt="Screenshot 2025-11-27 at 13 28 22"
src="https://github.com/user-attachments/assets/07e5b9aa-4a1c-44ff-ac6a-402a0712bd1a"
/>
### **After**
https://github.com/user-attachments/assets/221c05e4-b040-4583-b81f-de674f716db1
<img width="385" height="220" alt="Screenshot 2025-11-27 at 13 29 52"
src="https://github.com/user-attachments/assets/02b959f4-7334-454f-8939-931054f68bf3"
/>
<img width="383" height="194" alt="Screenshot 2025-11-27 at 13 29 36"
src="https://github.com/user-attachments/assets/a1eb109d-e74a-4de2-9844-ec5675e565c3"
/>
## **Pre-merge author checklist**
- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] 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.
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Recipient avatars now derive from the account group’s icon seed (with
address fallback), and useAccounts returns accountGroupId; tests updated
accordingly.
>
> - **UI (recipient)**:
> - Avatar `accountAddress` now sourced from account group icon seed via
`selectIconSeedAddressByAccountGroupId`, with fallback to
`recipient.address`.
> - `RecipientType` extended with `accountGroupId`; Redux selector added
to compute avatar seed.
> - **Hooks**:
> - `useAccounts` now includes `accountGroupId` in returned recipient
objects.
> - **Tests**:
> - Updated `useAccounts.test.ts` expectations to include
`accountGroupId` across EVM, Solana, Bitcoin, and Tron cases.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
bcc1017. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 52de418 commit f41df4d
File tree
3 files changed
+27
-1
lines changed- app/components/Views/confirmations
- components/UI/recipient
- hooks/send
3 files changed
+27
-1
lines changedLines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
49 | 68 | | |
50 | 69 | | |
51 | 70 | | |
| |||
73 | 92 | | |
74 | 93 | | |
75 | 94 | | |
76 | | - | |
| 95 | + | |
77 | 96 | | |
78 | 97 | | |
79 | 98 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| 277 | + | |
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
| |||
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
| 322 | + | |
320 | 323 | | |
321 | 324 | | |
322 | 325 | | |
| |||
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
| 384 | + | |
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
| |||
598 | 602 | | |
599 | 603 | | |
600 | 604 | | |
| 605 | + | |
601 | 606 | | |
602 | 607 | | |
603 | 608 | | |
604 | 609 | | |
605 | 610 | | |
606 | 611 | | |
607 | 612 | | |
| 613 | + | |
608 | 614 | | |
609 | 615 | | |
610 | 616 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
0 commit comments