Skip to content

chore: remove pinned swap token from asset picker#40211

Merged
micaelae merged 12 commits intomainfrom
swaps3982-rm-pinned-asset
Feb 18, 2026
Merged

chore: remove pinned swap token from asset picker#40211
micaelae merged 12 commits intomainfrom
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 behavioral change scoped to asset-picker token inclusion/sorting plus corresponding test/snapshot updates; low risk outside of potential UX ordering regressions.

Overview
The bridge asset picker no longer injects the currently selected token into the assetsToInclude list used for fetching/populating tokens, so the selected asset keeps its natural sort position instead of being pinned.

Updates BridgeInputGroup unit tests and snapshots to match the new request payloads and list ordering expectations, relaxes one fetch call-count assertion, and adjusts Jest console baselines for a new React unmounted-state-update warning.

Written by Cursor Bugbot for commit 0842ec5. 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 (3 files, +61 -72)
  • 📁 ui/
    • 📁 pages/
      • 📁 bridge/
        • 📁 prepare/
          • 📁 __snapshots__/
            • 📄 bridge-input-group.test.tsx.snap +3 -21
          • 📁 components/
            • 📁 bridge-asset-picker/
              • 📄 index.tsx +2 -2
            • 📄 bridge-input-group.test.tsx +56 -49

@micaelae micaelae marked this pull request as ready for review February 18, 2026 17:47
@micaelae micaelae requested a review from a team as a code owner February 18, 2026 17:47
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 18, 2026

Builds ready [0842ec5]
UI Startup Metrics (1451 ± 103 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14511233186610314811658
load1244105116409612721414
domContentLoaded1235104616019212641406
domInteractive2818106182678
firstPaint1497042274212269
backgroundConnect26024136418264293
firstReactRender18133741926
initialActions104113
loadScripts99380313239010241163
setupStore1362841520
numNetworkReqs312295192583
BrowserifyPower User HomeuiStartup3160146212189205037877667
load12751084181312813201592
domContentLoaded12581077178312512921564
domInteractive3520145223572
firstPaint201871256132260333
backgroundConnect9843006626114010363212
firstReactRender24174962636
initialActions103111
loadScripts995830152812310271315
setupStore1565271626
numNetworkReqs1014723838118174
WebpackStandard HomeuiStartup82264312041158981047
load701574974106774884
domContentLoaded695569968105766876
domInteractive2716109202474
firstPaint12358818103149203
backgroundConnect24166872633
firstReactRender17114371932
initialActions104111
loadScripts693567961104763874
setupStore1254361220
numNetworkReqs312297212592
WebpackPower User HomeuiStartup1323894317334313731804
load76465811621137541030
domContentLoaded75265311511137381024
domInteractive44211803343140
firstPaint1617645380206327
backgroundConnect2001341234161170386
firstReactRender23173732428
initialActions102111
loadScripts74965111401117361014
setupStore1343151521
numNetworkReqs1426424238161222
FirefoxBrowserifyStandard HomeuiStartup15791375216415416101926
load13231145170011613671553
domContentLoaded13221139170011613671553
domInteractive69292593990135
firstPaint------
backgroundConnect5528145186480
firstReactRender14111911416
initialActions102112
loadScripts12991120163411113421524
setupStore187178271436
numNetworkReqs311998212592
BrowserifyPower User HomeuiStartup29582286665861131773826
load16771322510951616962623
domContentLoaded16771322510851616962623
domInteractive180511764197179432
firstPaint------
backgroundConnect50111714883336981146
firstReactRender201577101828
initialActions109122
loadScripts16321298506050216622576
setupStore12315740152116509
numNetworkReqs934018635112169
WebpackStandard HomeuiStartup18091475331632517942189
load15071271294322915191743
domContentLoaded15071271294322915191743
domInteractive983130251133160
firstPaint------
backgroundConnect65262313770123
firstReactRender16132631621
initialActions103122
loadScripts14791247290822215011677
setupStore38713751383267
numNetworkReqs312089172771
WebpackPower User HomeuiStartup27361982351934029003367
load15791321258421616582041
domContentLoaded15781321258321616572040
domInteractive17651632146194567
firstPaint------
backgroundConnect40510811982804961055
firstReactRender21165962430
initialActions213122
loadScripts15301259254521616111944
setupStore13216581133192385
numNetworkReqs924123137110166
📊 Page Load Benchmark Results

Current Commit: 0842ec5 | Date: 2/18/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±51ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 748ms (±48ms) 🟢 | historical mean value: 745ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±10ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 51ms 1.02s 1.40s 1.08s 1.40s
domContentLoaded 748ms 48ms 716ms 1.07s 762ms 1.07s
firstPaint 83ms 10ms 64ms 164ms 92ms 164ms
firstContentfulPaint 83ms 10ms 64ms 164ms 92ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: -12 Bytes (0%)
  • common: 20 Bytes (0%)

@micaelae micaelae added this pull request to the merge queue Feb 18, 2026
Merged via the queue into main with commit b25af18 Feb 18, 2026
181 of 182 checks passed
@micaelae micaelae deleted the swaps3982-rm-pinned-asset branch February 18, 2026 19:50
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2026
@metamaskbot metamaskbot added the release-13.20.0 Issue or pull request that will be included in release 13.20.0 label Feb 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants