Skip to content

Conversation

@SteP-n-s
Copy link
Contributor

@SteP-n-s SteP-n-s commented Nov 6, 2025

Description

Fix issue with incorrect network order & fees

Changelog

CHANGELOG entry: fix incorrect network order and fees

Related issues

Fixes: #22314

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Screen.Recording.2025-11-06.at.11.51.42.mov
simulator_screenshot_AC60FBFE-5FB0-488D-97F1-9D16106F285E

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

Sorts destination networks by popularity with BTC included and standardizes network fee display to fiat, with updated tests and e2e adjustments.

  • Bridge UI
    • Network ordering: Export and use ChainPopularity to sort destination networks; add BTC (BtcScope.Mainnet) and adjust rankings; fallback to Infinity for unknown chains.
    • Dest selector: Apply popularity sort in BridgeDestNetworkSelector (excludes current chain unless Unified mode).
    • Snapshots/Tests: Update snapshots to reflect new order; add test for popularity fallback.
  • Quote Data
    • Fees: Always format networkFee using fiat valueInCurrency (handles <$0.01, $0, and missing values as -); remove primary-currency/ticker-based formatting.
    • Unit Tests: Update and expand tests to cover new fee formatting cases and edge conditions.
  • E2E
    • Adjust swipeNetwork to target updated ordering.

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

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-swaps-and-bridge Swaps and Bridge team label Nov 6, 2025
@github-actions github-actions bot added the size-S label Nov 6, 2025
@SteP-n-s SteP-n-s marked this pull request as ready for review November 7, 2025 12:33
@SteP-n-s SteP-n-s requested a review from a team as a code owner November 7, 2025 12:33
@github-actions github-actions bot added size-M and removed size-S labels Nov 7, 2025
@SteP-n-s SteP-n-s changed the title fix: use correct order for networks fix: use correct order for BTC network and fees Nov 7, 2025
@SteP-n-s SteP-n-s changed the title fix: use correct order for BTC network and fees fix: use correct order for BTC network and fees cp-7.59.0 Nov 7, 2025
@bfullam bfullam enabled auto-merge November 10, 2025 19:31
@sonarqubecloud
Copy link

@bfullam bfullam added this pull request to the merge queue Nov 10, 2025
Merged via the queue into main with commit 01739ee Nov 10, 2025
144 of 148 checks passed
@bfullam bfullam deleted the fix/btc_fees_order branch November 10, 2025 23:05
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2025
@metamaskbot metamaskbot added release-7.60.0 Issue or pull request that will be included in release 7.60.0 release-7.59.0 Issue or pull request that will be included in release 7.59.0 and removed release-7.60.0 Issue or pull request that will be included in release 7.60.0 labels Nov 10, 2025
@metamaskbot
Copy link
Collaborator

Missing release label release-7.59.0 on PR. Adding release label release-7.59.0 on PR and removing other release labels(release-7.60.0), as PR was cherry-picked in branch 7.59.0.

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

Labels

release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-M team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Incorrect network ordering + fees

5 participants