Skip to content

feat: new assets controllers integration#40228

Merged
salimtb merged 9 commits intomainfrom
feat/new-assets-controllers-integration
Feb 20, 2026
Merged

feat: new assets controllers integration#40228
salimtb merged 9 commits intomainfrom
feat/new-assets-controllers-integration

Conversation

@salimtb
Copy link
Contributor

@salimtb salimtb commented Feb 19, 2026

Description

support import/hide tokens for the new controller

make sure the FF isAssetsUnifyStateFeatureEnabled is on

Open in GitHub Codespaces

Changelog

CHANGELOG entry: support import/hide tokens for the new controller

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

after.mov

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

Medium Risk
Touches token import/hide flows and adds new background RPC actions for the unified AssetsController; behavior now branches on a feature flag and CAIP-19 ID handling, which could affect asset visibility and state refresh timing.

Overview
Adds unified AssetsController integration for token import/hide when the assetsUnifyState feature flag is enabled.

The background API and Redux actions now support hideAsset, unhideAsset, addCustomAsset, removeCustomAsset, plus a new importCustomAssetsBatch that avoids per-token state refreshes by batching requests and refreshing once.

UI flows are updated to use CAIP-19 assetIds: the hide-token confirmation will either remove a custom asset from the account or hide it in preferences, and the import-tokens modal will batch add/unhide imported tokens while preserving hidden state; new selectors/tests are added for reading assetPreferences/customAssets and checking hidden/custom status.

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

@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.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 19, 2026

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/core-extension-ux (1 files, +26 -0)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 import-tokens-modal/
          • 📄 import-tokens-modal.js +26 -0

@salimtb salimtb changed the title Feat/new assets controllers integration feat: new assets controllers integration Feb 19, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 19, 2026

Builds ready [9346080]
UI Startup Metrics (1444 ± 107 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14441234185610715151617
load12291013158910012981392
domContentLoaded1221100915279612911386
domInteractive2917164222580
firstPaint194691324203215382
backgroundConnect25723433317265291
firstReactRender2013152142029
initialActions105113
loadScripts98077112809310341139
setupStore1263251521
numNetworkReqs312289192284
BrowserifyPower User HomeuiStartup2247148210172138621044205
load12661084195216613211681
domContentLoaded12461066191916212941621
domInteractive3621134203690
firstPaint224791581187280395
backgroundConnect607309796810403891954
firstReactRender24164662639
initialActions105112
loadScripts979812164615910071375
setupStore1664461927
numNetworkReqs69351442582126
WebpackStandard HomeuiStartup8797041215979481032
load75062696387805912
domContentLoaded74462395586787896
domInteractive2916126222482
firstPaint1255965478147219
backgroundConnect302079113248
firstReactRender18124062032
initialActions105112
loadScripts74062194784785888
setupStore1272741319
numNetworkReqs312298202585
WebpackPower User HomeuiStartup1261931171316013651573
load76365513171297551098
domContentLoaded75364912891297441086
domInteractive42202383741128
firstPaint1557259094159360
backgroundConnect18013537453185299
firstReactRender24184442530
initialActions102111
loadScripts75064612681267421075
setupStore1354251521
numNetworkReqs1153928651143219
FirefoxBrowserifyStandard HomeuiStartup16011359259022316172019
load13411152235417113691588
domContentLoaded13401152234817013681587
domInteractive8236108410989149
firstPaint------
backgroundConnect61272653556121
firstReactRender13111811416
initialActions103112
loadScripts13131131232816313461532
setupStore217180311569
numNetworkReqs3219101212593
BrowserifyPower User HomeuiStartup28792116904873229863632
load16751230730763517402292
domContentLoaded16741230730763517402292
domInteractive15233727133164389
firstPaint------
backgroundConnect3401261240261474890
firstReactRender201473111841
initialActions203122
loadScripts16201209721262216792115
setupStore1778767217247671
numNetworkReqs70311703790135
WebpackStandard HomeuiStartup17101393330325717232045
load14291158280917614541627
domContentLoaded14281155280517614541627
domInteractive98281448143103182
firstPaint------
backgroundConnect62252013566132
firstReactRender15132831622
initialActions1014122
loadScripts14031144278817214311582
setupStore32713941381571
numNetworkReqs311989162774
WebpackPower User HomeuiStartup28151996964088928563631
load16741313757775116442207
domContentLoaded16741313757775116442207
domInteractive13933760132128491
firstPaint------
backgroundConnect3511161309275453978
firstReactRender21163242429
initialActions207122
loadScripts16301291751774716002184
setupStore1308712162153477
numNetworkReqs70292153782131
📊 Page Load Benchmark Results

Current Commit: 9346080 | Date: 2/19/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±40ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 734ms (±38ms) 🟢 | historical mean value: 724ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±13ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 40ms 1.02s 1.34s 1.07s 1.34s
domContentLoaded 734ms 38ms 711ms 1.01s 755ms 1.01s
firstPaint 81ms 13ms 64ms 204ms 84ms 204ms
firstContentfulPaint 81ms 13ms 64ms 204ms 84ms 204ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -308 Bytes (-0.01%)
  • ui: -304 Bytes (0%)
  • common: 1.33 KiB (0.01%)

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 19, 2026

Builds ready [3db9a7c]
UI Startup Metrics (1442 ± 108 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14421229170010815161624
load1242105414369713091408
domContentLoaded1234102614319413021397
domInteractive291799192582
firstPaint178691426186211310
backgroundConnect25823540520261285
firstReactRender2012232221924
initialActions105112
loadScripts99380111789310491161
setupStore1253341419
numNetworkReqs312290192583
BrowserifyPower User HomeuiStartup17591364484637417772268
load11551012183016311711585
domContentLoaded1138998174915311561543
domInteractive3717239303796
firstPaint219691585180253366
backgroundConnect329268100878331397
firstReactRender23155572532
initialActions104112
loadScripts90776915031469121278
setupStore16864101734
numNetworkReqs61361592667128
WebpackStandard HomeuiStartup9227641307989541119
load786637103996860936
domContentLoaded780631103396853929
domInteractive3117103212686
firstPaint1256330653155229
backgroundConnect29206583342
firstReactRender20134672234
initialActions103112
loadScripts777629103195851925
setupStore1464471327
numNetworkReqs312293202586
WebpackPower User HomeuiStartup1247908195318113491596
load73362612111237261036
domContentLoaded72361912051237171030
domInteractive40181843439128
firstPaint1487345981169304
backgroundConnect17212833348179288
firstReactRender23173942429
initialActions102011
loadScripts72161711951207151016
setupStore1254051521
numNetworkReqs1113625750140235
FirefoxBrowserifyStandard HomeuiStartup16741442268822616792094
load14081196236719914351742
domContentLoaded14061196236719914331737
domInteractive68332984587135
firstPaint------
backgroundConnect64302543665129
firstReactRender14112021418
initialActions102122
loadScripts13761174229418614071685
setupStore177162181541
numNetworkReqs311997202787
BrowserifyPower User HomeuiStartup27661966505347328863677
load16171348337535016752313
domContentLoaded16171348337435016752313
domInteractive154371801214119505
firstPaint------
backgroundConnect3001191622274270912
firstReactRender19147091822
initialActions2048522
loadScripts15821317333334616342253
setupStore1605779218136686
numNetworkReqs63281613379127
WebpackStandard HomeuiStartup16981411352228717102045
load14391224313125514551647
domContentLoaded14381224313125514551646
domInteractive913123342131145
firstPaint------
backgroundConnect55272152856103
firstReactRender15122931521
initialActions103122
loadScripts14141203311225414301614
setupStore197168201645
numNetworkReqs311988182781
WebpackPower User HomeuiStartup27852003670057929163841
load16211310257929517092290
domContentLoaded16201309257829417082290
domInteractive13534715129136405
firstPaint------
backgroundConnect328493218364318887
firstReactRender241677102833
initialActions203123
loadScripts15861285253528716752226
setupStore1599839203164623
numNetworkReqs64282123582128
📊 Page Load Benchmark Results

Current Commit: 3db9a7c | Date: 2/19/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 952ms (±135ms) 🟢 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 678ms (±158ms) 🟢 | historical mean value: 724ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 87ms (±140ms) 🟢 | historical mean value: 86ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 952ms 135ms 918ms 2.27s 973ms 2.27s
domContentLoaded 678ms 158ms 640ms 2.23s 694ms 2.23s
firstPaint 87ms 140ms 60ms 1.48s 84ms 1.48s
firstContentfulPaint 87ms 140ms 60ms 1.48s 84ms 1.48s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -308 Bytes (-0.01%)
  • ui: -304 Bytes (0%)
  • common: 1.33 KiB (0.01%)

@salimtb salimtb marked this pull request as ready for review February 19, 2026 13:15
@salimtb salimtb requested a review from a team as a code owner February 19, 2026 13:15
Copy link

@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 2 potential issues.

@salimtb salimtb force-pushed the feat/new-assets-controllers-integration branch from 19c3ee5 to 63bc65c Compare February 19, 2026 13:50
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 19, 2026

Builds ready [63bc65c]
UI Startup Metrics (1437 ± 115 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14371221175011514951651
load12371050148510112881426
domContentLoaded12301042147810112821409
domInteractive2816108192577
firstPaint191701284201210343
backgroundConnect26123744223271290
firstReactRender18115951923
initialActions105123
loadScripts98780212439810321168
setupStore1262441418
numNetworkReqs312292202286
BrowserifyPower User HomeuiStartup2703150610810160926234819
load12611092204815613131552
domContentLoaded12431079199115012891538
domInteractive39202413535105
firstPaint214861611188257334
backgroundConnect873297824811517152860
firstReactRender25167692642
initialActions104112
loadScripts985840168814310241262
setupStore1574971727
numNetworkReqs77381572592120
WebpackStandard HomeuiStartup90272411721029481134
load770631107997834945
domContentLoaded763628106796828939
domInteractive3217140242780
firstPaint1286530256159239
backgroundConnect29206683244
firstReactRender20124172338
initialActions105113
loadScripts760626106595825931
setupStore1365571421
numNetworkReqs312290192584
WebpackPower User HomeuiStartup1210850323228512761613
load687595101299679929
domContentLoaded677588100799669922
domInteractive3518129243497
firstPaint1416041672177286
backgroundConnect1727268980162293
firstReactRender22175452431
initialActions103111
loadScripts675586100097666914
setupStore1141831317
numNetworkReqs1263824145148220
FirefoxBrowserifyStandard HomeuiStartup16761446257518616792026
load14061207224215214271608
domContentLoaded14051207224215214271608
domInteractive813321438109139
firstPaint------
backgroundConnect6133184226492
firstReactRender14114231516
initialActions102122
loadScripts13791180220914914021584
setupStore2371633117113
numNetworkReqs3119101202789
BrowserifyPower User HomeuiStartup28352145390233830133477
load16001370209716716881926
domContentLoaded15991363209716716881926
domInteractive15536715118169361
firstPaint------
backgroundConnect3581291381264414911
firstReactRender19157362027
initialActions203122
loadScripts15561342205415616411842
setupStore182121232232162657
numNetworkReqs82311903698162
WebpackStandard HomeuiStartup17271458340621317742022
load14571205297117915011578
domContentLoaded14571201297117915001577
domInteractive112291447143132219
firstPaint------
backgroundConnect62251972975117
firstReactRender15122631620
initialActions103122
loadScripts14321192294317714791553
setupStore227143271762
numNetworkReqs312093172773
WebpackPower User HomeuiStartup28241959877671830213450
load15911329733060816001896
domContentLoaded15901329733060816001896
domInteractive156351054162163506
firstPaint------
backgroundConnect4725813323276971190
firstReactRender20153642329
initialActions216123
loadScripts15561264729560715691873
setupStore13716783161156516
numNetworkReqs77182213990154
📊 Page Load Benchmark Results

Current Commit: 63bc65c | Date: 2/19/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.09s (±49ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 750ms (±44ms) 🟢 | historical mean value: 726ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±11ms) 🟢 | historical mean value: 84ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.09s 49ms 1.05s 1.41s 1.11s 1.41s
domContentLoaded 750ms 44ms 719ms 1.04s 779ms 1.04s
firstPaint 85ms 11ms 64ms 172ms 96ms 172ms
firstContentfulPaint 85ms 11ms 64ms 172ms 96ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -308 Bytes (-0.01%)
  • ui: 1.22 KiB (0.01%)
  • common: 1.67 KiB (0.02%)

@salimtb salimtb added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit 81c1c39 Feb 20, 2026
218 of 232 checks passed
@salimtb salimtb deleted the feat/new-assets-controllers-integration branch February 20, 2026 14:37
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2026
@metamaskbot metamaskbot added the release-13.21.0 Issue or pull request that will be included in release 13.21.0 label Feb 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.21.0 Issue or pull request that will be included in release 13.21.0 size-L team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants