Skip to content

Conversation

@runway-github
Copy link
Contributor

@runway-github runway-github bot commented Nov 27, 2025

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:

Manual testing steps

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

Simulator.Screen.Recording.-.iPhone.16.Plus.-.2025-11-27.at.13.25.36.mov

Screenshot 2025-11-27 at 13 28 36
Screenshot 2025-11-27 at 13 28 22

After

Simulator.Screen.Recording.-.iPhone.16.Plus.-.2025-11-27.at.13.14.06.mov

Screenshot 2025-11-27 at 13 29 52
Screenshot 2025-11-27 at 13 29 36

Pre-merge author checklist

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

Recipient avatars now use the account group’s icon seed with address fallback; useAccounts adds accountGroupId and tests updated accordingly.

  • Confirmations UI:
    • app/components/Views/confirmations/components/UI/recipient/recipient.tsx
      • Avatar accountAddress now sourced from account group seed via selectIconSeedAddressByAccountGroupId(recipient.accountGroupId) with fallback to recipient.address.
      • Adds Redux selector usage and AccountGroupId typing.
  • Send Hooks:
    • app/components/Views/confirmations/hooks/send/useAccounts.ts
      • Includes accountGroupId in returned recipient objects.
  • Tests:
    • useAccounts.test.ts expectations updated to include accountGroupId across EVM, Solana, Bitcoin, and Tron cases.

Written by Cursor Bugbot for commit f41df4d. This will update automatically on new commits. Configure here.

0f7ac87

…#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 -->
@runway-github runway-github bot requested a review from a team as a code owner November 27, 2025 17:09
@github-actions
Copy link
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.

@metamaskbot metamaskbot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Nov 27, 2025
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeCore, SmokeConfirmationsRedesigned, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeWalletUX, SmokeAssets, SmokeSwaps, SmokeStake, SmokeCard, SmokeNotifications, SmokeRewards, SmokePerps, SmokeRamps, SmokeMultiChainPermissions, SmokeAnalytics, SmokeMultiChainAPI, SmokePredictions
  • Risk Level: high
  • AI Confidence: %
click to see 🤖 AI reasoning details

Fallback: AI analysis did not complete successfully. Running all tests.

View GitHub Actions results

} catch {
return recipient.address;
}
});
Copy link

Choose a reason for hiding this comment

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

Bug: Selector recreated on every render causing performance issues

The selector selectIconSeedAddressByAccountGroupId is created inside the useSelector callback without memoization, causing a new selector instance to be created on every render. This defeats the selector's memoization and causes unnecessary recomputations. The selector should be created using useMemo with recipient.accountGroupId as a dependency, then passed to useSelector, following the pattern used in AccountCell.tsx.

Fix in Cursor Fix in Web

@joaoloureirop joaoloureirop enabled auto-merge (squash) November 27, 2025 17:23
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
37.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@joaoloureirop joaoloureirop added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Nov 27, 2025
@joaoloureirop joaoloureirop merged commit 33f5eba into release/7.60.0 Nov 27, 2025
156 of 162 checks passed
@joaoloureirop joaoloureirop deleted the runway-cherry-pick-7.60.0-1764263340 branch November 27, 2025 18:28
@github-actions github-actions bot locked and limited conversation to collaborators Nov 27, 2025
@metamaskbot metamaskbot added the release-7.60.0 Issue or pull request that will be included in release 7.60.0 label Nov 27, 2025
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.60.0 on PR, as PR was cherry-picked in branch 7.60.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.60.0 Issue or pull request that will be included in release 7.60.0 skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants