Skip to content

chore: remove pinned swap token from asset picker#40204

Merged
micaelae merged 4 commits intoswaps/fix-bridge-input-flakyfrom
swaps3982-rm-pinned-asset
Feb 18, 2026
Merged

chore: remove pinned swap token from asset picker#40204
micaelae merged 4 commits intoswaps/fix-bridge-input-flakyfrom
swaps3982-rm-pinned-asset

Conversation

@micaelae
Copy link
Copy Markdown
Member

@micaelae micaelae commented Feb 18, 2026

Description

Preserves the selected asset's sorting order instead of pinning it to the top of the list

Open in GitHub Codespaces

Changelog

CHANGELOG entry: chore: remove pinned swap token from asset picker

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-3982

Manual testing steps

  1. Select asset in Swap flow
  2. Reopen the asset picker and verify selected asset does not appear at the top of the list

Screenshots/Recordings

Before

After

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

Low Risk
Small UI/data-fetch parameter tweak limited to the bridge asset picker; main risk is subtle changes to token ordering and API caching behavior.

Overview
Updates the bridge asset picker to stop forcing the currently selected asset into the assetsToInclude list, so token fetches and resulting ordering are no longer influenced by the selected token.

This removes selectedAsset from the useMemo that builds assetsToInclude (and its dependency), and updates the BridgeInputGroup Jest snapshots to reflect the changed includeAssets request bodies and cache keys.

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

@metamaskbot metamaskbot added the team-swaps-and-bridge Swaps and Bridge team label Feb 18, 2026
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 18, 2026

✨ Files requiring CODEOWNER review ✨

🔄 @MetaMask/swaps-engineers (2 files, +8 -8)
  • 📁 ui/
    • 📁 pages/
      • 📁 bridge/
        • 📁 prepare/
          • 📁 __snapshots__/
            • 📄 bridge-input-group.test.tsx.snap +6 -6
          • 📁 components/
            • 📁 bridge-asset-picker/
              • 📄 index.tsx +2 -2

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 18, 2026

Builds ready [3bc6076]
UI Startup Metrics (1440 ± 106 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14401234192510614961623
load1234104915999212781398
domContentLoaded1226104415929212671388
domInteractive2817102192577
firstPaint175691283173218358
backgroundConnect26224140320266288
firstReactRender2010186231925
initialActions105113
loadScripts98180113349210241141
setupStore1264951522
numNetworkReqs231588201582
BrowserifyPower User HomeuiStartup3379168511017213540639409
load13361114173414914131693
domContentLoaded13141102170513713651649
domInteractive3721186263493
firstPaint253861608229290350
backgroundConnect12933179024173613373820
firstReactRender25184752635
initialActions105112
loadScripts1042852144513010731337
setupStore166164161724
numNetworkReqs914115225107134
WebpackStandard HomeuiStartup857710112793937987
load74963192391821900
domContentLoaded74362891391815895
domInteractive2716103182478
firstPaint1146332149138211
backgroundConnect26194262941
firstReactRender1610132121724
initialActions104112
loadScripts74062691190813893
setupStore1263851222
numNetworkReqs231586201582
WebpackPower User HomeuiStartup1368915299434214112098
load78867711411067991049
domContentLoaded77666311351077861036
domInteractive43222383439119
firstPaint1768445688214361
backgroundConnect189137912100180316
firstReactRender23183132529
initialActions102011
loadScripts77366111251047841027
setupStore1352851621
numNetworkReqs1407530037158189
FirefoxBrowserifyStandard HomeuiStartup15591310232319315992025
load13461151209215114001661
domContentLoaded13441150208715113961660
domInteractive71323125490171
firstPaint------
backgroundConnect54251772354103
firstReactRender12102521317
initialActions103112
loadScripts13201133205814413741630
setupStore166174261344
numNetworkReqs241298211781
BrowserifyPower User HomeuiStartup27972050610347528973370
load15791314493839616341882
domContentLoaded15791314493839616341881
domInteractive174511407171198475
firstPaint------
backgroundConnect3861241205254462900
firstReactRender201466102052
initialActions2053522
loadScripts15311268489339115681829
setupStore13513844174144560
numNetworkReqs944318732111167
WebpackStandard HomeuiStartup16431352321820416881824
load14351191284117214881572
domContentLoaded14351191284117214871572
domInteractive112301486147132195
firstPaint------
backgroundConnect5224212315698
firstReactRender13112721417
initialActions102022
loadScripts14121173280616814621547
setupStore136165181232
numNetworkReqs231296171763
WebpackPower User HomeuiStartup28682199891682929403440
load16351337765364216602118
domContentLoaded16351337765364216592117
domInteractive15650754150135604
firstPaint------
backgroundConnect47112213293066831047
firstReactRender22156772332
initialActions205122
loadScripts15731305758063415642030
setupStore152173674381121558
numNetworkReqs954222338102174
📊 Page Load Benchmark Results

Current Commit: 3bc6076 | Date: 2/18/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±55ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 747ms (±53ms) 🟢 | historical mean value: 741ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 82ms (±12ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 55ms 1.03s 1.35s 1.13s 1.35s
domContentLoaded 747ms 53ms 719ms 1.04s 793ms 1.04s
firstPaint 82ms 12ms 68ms 180ms 92ms 180ms
firstContentfulPaint 82ms 12ms 68ms 180ms 92ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: -12 Bytes (0%)
  • common: 20 Bytes (0%)

@micaelae micaelae marked this pull request as ready for review February 18, 2026 15:59
@micaelae micaelae requested a review from a team as a code owner February 18, 2026 15:59
@micaelae micaelae changed the base branch from main to swaps/fix-bridge-input-flaky February 18, 2026 17:41
@micaelae micaelae merged commit 08376f6 into swaps/fix-bridge-input-flaky Feb 18, 2026
4 of 6 checks passed
@micaelae micaelae deleted the swaps3982-rm-pinned-asset branch February 18, 2026 17:42
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants