Skip to content

fix(activity): show account name and avatar for owned accounts in activity list#33390

Draft
vinnyhoward wants to merge 1 commit into
mainfrom
fix-tmcu-1065-activity-to-account-name
Draft

fix(activity): show account name and avatar for owned accounts in activity list#33390
vinnyhoward wants to merge 1 commit into
mainfrom
fix-tmcu-1065-activity-to-account-name

Conversation

@vinnyhoward

Copy link
Copy Markdown
Contributor

Description

When sending to (or receiving from) another account the user owns, the redesigned Activity list row subtitle showed a raw short hex address (To: 0xAa609...40973). Since the user owns that account and it has a name everywhere else in the app, this could scare them into thinking they sent to the wrong address.

This PR resolves the send/receive counterparty against the user's own accounts (the same account-group name resolution the redesigned transaction details screen already uses via useAccountNames) and renders the subtitle as To: <account avatar> <account name> — e.g. To: 🟦 ETH DeFi — matching the names and avatars shown in the Accounts list. Receive rows get the same treatment for From:. Addresses the user doesn't own keep the existing short-address subtitle.

Implementation notes:

  • useActivityListItemRowContent resolves the counterparty via useAccountNames and returns a structured subtitleAccount (prefix, address, name) alongside the plain-text subtitle fallback
  • New useSubtitleAccountParts hook builds the AvatarAccount (16px, honors the user's avatar style setting) subtitle node, shared by the resolved and pending row variants; queued rows keep their Queued • prefix
  • ActivityListItemRowLayout renders the structured subtitle row; all other rows are untouched

Changelog

CHANGELOG entry: Fixed the Activity list showing a hex address instead of the account name when transferring between your own accounts

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-1065

Manual testing steps

Feature: Activity list shows account names for owned accounts

  Scenario: user sends to another account they own
    Given the user has multiple accounts in their wallet
    And the activity redesign feature flags are enabled

    When user starts a Send and selects another account they own as the recipient (via the account picker)
    And user completes the send
    And user opens the Activity view
    Then the send row subtitle shows "To: <account avatar> <account name>" instead of a hex address

  Scenario: user sends to an external address
    When user sends to an address they do not own
    And user opens the Activity view
    Then the send row subtitle still shows the shortened hex address

Screenshots/Recordings

Before

To: 0xAa609...40973 (hex address shown for an owned account)

After

To: <avatar> ETH DeFi (account name + avatar, matching the Accounts list)

Pre-merge author checklist

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 to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

…ivity list

The redesigned activity list row subtitle rendered the send/receive
counterparty as a short hex address only. Sends between the user's own
accounts now resolve the counterparty against the account tree and render
"To: <avatar> <account name>" (and "From: ..." on receives), matching
the name resolution the transaction details screen already does.

- useActivityListItemRowContent resolves the counterparty via
  useAccountNames and returns a structured subtitleAccount
- useSubtitleAccountParts builds the AvatarAccount subtitle node shared
  by the resolved and pending row variants (queued prefix preserved)
- Unowned addresses keep the existing short-address subtitle
@vinnyhoward vinnyhoward added the team-mobile-ux Mobile UX team label Jul 15, 2026
@github-actions

Copy link
Copy Markdown
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.

@metamask-ci

metamask-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Pre-merge author checklist has unchecked items (e.g. "I've tested on Android"). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are focused on the ActivityListItemRow component, which displays transaction history items in the wallet. The key changes are:

  1. New useSubtitleAccountParts hook: Builds a structured subtitle with account avatar when the counterparty of a send/receive transaction is one of the user's own accounts.
  2. useActivityListItemRowContent.ts: Now resolves the counterparty address against the user's own accounts using useAccountNames, so transfers between own accounts show the account name instead of a hex address.
  3. ActivityListItemRowLayout.tsx: Updated to render the new subtitleParts with avatar inline in the subtitle row.
  4. PendingActivityListItemRow.tsx: Also updated to use the new subtitle account parts for pending transactions.
  5. Style additions: New styles for the account avatar in the subtitle.

SmokeWalletPlatform is selected because it explicitly covers "transaction history: displaying incoming/outgoing ETH transactions, token transfer details" - which is exactly what these changes affect. The activity list is a core wallet platform feature.

SmokeConfirmations is selected because it tests transaction sending for native tokens (ETH) and ERC-20 tokens, and the activity list is where confirmed transactions appear. The send/receive flow is directly impacted by the subtitle changes.

The changes are UI-only (no controller logic, no network changes, no security changes), so the risk is medium. The feature is additive (showing account names instead of hex addresses for own-account transfers), but it touches the core activity list rendering path used across the app.

Performance Test Selection:
The changes are UI-only enhancements to the ActivityListItemRow component. While the activity list is rendered in the wallet, the changes add a new hook (useSubtitleAccountParts) and account name resolution (useAccountNames) to the subtitle rendering. This is a minor addition that resolves account names for send/receive transactions. There is no significant performance impact expected - the account name lookup is a selector-based operation, not a network call. No performance test tags are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant