Skip to content

Conversation

@PatrykLucka
Copy link
Contributor

@PatrykLucka PatrykLucka commented Nov 13, 2025

Description

The current ordering of chains in the Receiving Address and Account Selector screens feels arbitrary, mixing EVM and non-EVM networks without logical prioritization.
For users managing multiple chains, especially newcomers, this inconsistency causes cognitive load and confusion when trying to locate primary networks like Ethereum, Bitcoin, or Solana.

This PR changes the order of networks to: first set of networks being [Ethereum, Bitcoin, Solana, Tron, Linea] and then the rest.

Changelog

CHANGELOG entry: Updates the order of networks on networks list

Related issues

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

Manual testing steps

Feature: Receiving address

  Scenario: user lists receiving address
    Given user onboarded

    When user clicks copy button at the top of the main page
    Then the networks list have Ethereum, Bitcoin, Solana, Tron, Linea at the beginning of the list

Screenshots/Recordings

Before

Screenshot 2025-11-13 at 12 34 03

After

Screenshot 2025-11-13 at 12 49 13

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

Reorders multichain address sorting to ETH > BTC > SOL > TRX > Linea, normalizes CAIP IDs, and updates selectors, tests, and snapshots to match.

  • Multichain sorting utils (MultichainAddressRowsList.utils.ts):
    • Implement new priority: Ethereum (0), Bitcoin (1), Solana (2), Tron (3), Linea (4), then featured, others, testnets last.
    • Normalize EVM CAIP IDs by converting decimal to hex in extractHexChainId.
    • Add BtcScope and TrxScope handling; update sorting docstring.
  • Selectors (app/selectors/multichainAccounts/accounts.ts):
    • Use sortNetworkAddressItems to order account-scope items consistently across views.
  • Tests & snapshots:
    • Update unit tests to assert new ordering in utils, AddressSelector, and selectors.
    • Refresh AddressSelector snapshot to reflect reordered networks and labels.

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

@PatrykLucka PatrykLucka self-assigned this Nov 13, 2025
@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-mobile-ux Mobile UX team label Nov 13, 2025
@PatrykLucka PatrykLucka force-pushed the TMCU-175-mobile-update-networks-order-on-address-list branch from 8b535db to a487cac Compare November 13, 2025 12:14
@PatrykLucka PatrykLucka marked this pull request as ready for review November 13, 2025 13:30
@PatrykLucka PatrykLucka requested a review from a team as a code owner November 13, 2025 13:30
gantunesr
gantunesr previously approved these changes Nov 14, 2025
@PatrykLucka PatrykLucka force-pushed the TMCU-175-mobile-update-networks-order-on-address-list branch from 396339c to dae32b6 Compare November 14, 2025 14:54
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeNetworkAbstractions
  • Risk Level: medium
  • AI Confidence: 75%
click to see 🤖 AI reasoning details

After analyzing the changed files, I found that all 6 files are related to multichain account management and address selection functionality. Here's the breakdown:

Files Changed:

  1. MultichainAddressRowsList.utils.ts and its test - Contains sorting logic for network address items and compatibility checking for multichain accounts
  2. accounts.ts and its test - Selector logic for managing multichain accounts, including selectInternalAccountListSpreadByScopesByGroupId which uses the sorting utility
  3. AddressSelector.test.tsx and its snapshot - Test for the AddressSelector component which displays addresses across multiple networks

Key Functionality Impacted:

  • Multichain Account Management: The changes affect how accounts are displayed across different networks (Ethereum, Bitcoin, Solana, Tron, Linea, etc.)
  • Network Sorting Logic: The sortNetworkAddressItems function determines the display order of networks (Ethereum first, Bitcoin second, Solana third, Tron fourth, Linea fifth, then featured/custom networks, test networks last)
  • Address Selection UI: The AddressSelector component uses these utilities to display and filter addresses by network

Why These Tags:

  1. SmokeAccounts: These changes directly impact multi-account management and how accounts are displayed across different blockchain networks. The AddressSelector component is used for account/address selection workflows.

  2. SmokeNetworkAbstractions: The changes involve network-specific logic including sorting, filtering (EVM vs non-EVM), and handling of multichain network configurations. The code handles network abstractions across Ethereum, Solana, Bitcoin, and Tron.

Risk Assessment - Medium:

  • Not pure documentation or comments - actual functional code changes
  • Involves selector logic and UI components for account/network management
  • The changes affect how users interact with accounts across multiple networks
  • Test files were updated, suggesting the behavior of these components may have changed
  • Not marked as critical files, but they touch important account management flows

Confidence: 75%

  • Clear understanding of the functional areas impacted (account management, network display)
  • Could see the relationship between the utility functions and their usage in selectors
  • Tests show network sorting priority changes
  • Some uncertainty about the exact nature of the changes (couldn't get git diffs) and whether this is a new feature, bug fix, or refactoring
  • Unable to fully verify if there are other components heavily dependent on these changes

View GitHub Actions results

@sonarqubecloud
Copy link

@PatrykLucka PatrykLucka added this pull request to the merge queue Nov 14, 2025
Merged via the queue into main with commit 47354bf Nov 14, 2025
90 checks passed
@PatrykLucka PatrykLucka deleted the TMCU-175-mobile-update-networks-order-on-address-list branch November 14, 2025 15:48
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2025
@metamaskbot metamaskbot added the release-7.61.0 Issue or pull request that will be included in release 7.61.0 label Nov 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.61.0 Issue or pull request that will be included in release 7.61.0 size-M team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants