Skip to content

Conversation

sahar-fehri
Copy link
Contributor

@sahar-fehri sahar-fehri commented Oct 10, 2025

Description

When a user re-imports a hidden token using custom import with checksum address, the token fails to import.
The test works successfully using the search token feature or adding the custom token in lowercase format.

The search token feature sends the tokens to the addTokens function in core in lowercase format because the tokensChainsCache in state are also in lowercase format.

When the user tries to re-add a hidden token in a checksum format; this causes the filter on this line to fail; hence the token does not appear on the list after clicking import.

The fix makes the addresses sent to the addTokens fct in lowercase to match the casing of tokensChainsCache.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Fixed a bug that was causing re-importing a previously hidden token using custom appear to not appear in the list

Related issues

Fixes: #36559

Manual testing steps

  1. Click on import tokens
  2. Import any token from search
  3. Notice the token is visible in the tokenList
  4. Click on the imported token
  5. Copy the checksummed token address from the asset details page
  6. Click on the options button and Hide the token
  7. Click on import tokens and click on custom
  8. Input the checksummed token address and click on import
  9. You should see the token visible in the list

Screenshots/Recordings

Before

Screen.Recording.2025-10-10.at.16.39.39.mov

After

Screen.Recording.2025-10-10.at.16.42.32.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

Lowercases addresses of imported tokens in addImportedTokens before sending to background.

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

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
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 6765478 | Date: 10/10/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±74ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 736ms (±72ms) 🟢 | historical mean value: 737ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±12ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 74ms 1.01s 1.34s 1.29s 1.34s
domContentLoaded 736ms 72ms 700ms 1.02s 970ms 1.02s
firstPaint 76ms 12ms 60ms 180ms 84ms 180ms
firstContentfulPaint 76ms 12ms 60ms 180ms 84ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [6765478]
UI Startup Metrics (1248 ± 68 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1248110914346812851368
load107393412646311111201
domContentLoaded106593012586511071197
domInteractive17144251731
firstPaint73579127042810871164
backgroundConnect26024437016261277
firstReactRender26177582742
getState13482101430
initialActions70378731
loadScripts813678100864850939
setupStore952631017
WebpackHomeuiStartup802690104360822939
load61857189460626782
domContentLoaded61056688760618776
domInteractive14114361332
firstPaint19257892187187590
backgroundConnect21104062532
firstReactRender2716139133033
getState831831012
initialActions2012236
loadScripts60756487458616762
setupStore84182811
FirefoxBrowserifyHomeuiStartup13881180189512614821600
load11951025147010012721364
domContentLoaded11951024147010012721364
domInteractive1003429851107219
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2918111143247
firstReactRender29254943037
getState63637514
initialActions30285216
loadScripts1172100614409612461341
setupStore9411913730
WebpackHomeuiStartup15681376211014816081974
load1354120016809914141559
domContentLoaded1354120016809914141559
domInteractive963337851103176
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3419141203896
firstReactRender352782103747
getState72489629
initialActions5013515223
loadScripts1329118415749313941531
setupStore14414522858
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -7.61 KiB (-0.17%)
  • ui: 1.48 KiB (0.02%)
  • common: 197 Bytes (0%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: b9488f5 | Date: 10/10/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±72ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±69ms) 🟢 | historical mean value: 737ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±11ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 72ms 1.00s 1.32s 1.29s 1.32s
domContentLoaded 731ms 69ms 694ms 995ms 975ms 995ms
firstPaint 76ms 11ms 56ms 160ms 88ms 160ms
firstContentfulPaint 76ms 11ms 56ms 160ms 88ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [b9488f5]
UI Startup Metrics (1250 ± 83 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1250111115908312801442
load108194214398211091275
domContentLoaded107393614328211011268
domInteractive1914122121739
firstPaint70676144144210881163
backgroundConnect2542412889258273
firstReactRender2719179172548
getState1153061425
initialActions40284511
loadScripts8266901195828501013
setupStore96364915
WebpackHomeuiStartup808696108268828991
load62357492569625832
domContentLoaded61556991668619827
domInteractive15115071335
firstPaint17656881174188591
backgroundConnect21104962530
firstReactRender26165773135
getState84163912
initialActions209236
loadScripts61256790566617813
setupStore84182912
FirefoxBrowserifyHomeuiStartup14201192180012814981701
load1217103414199113051374
domContentLoaded1217103414199113051374
domInteractive983331951105221
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3119112153368
firstReactRender29255343138
getState8226726517
initialActions4013915214
loadScripts1193101613908912761351
setupStore12414823660
WebpackHomeuiStartup15481353202512615981801
load1339120016369013781538
domContentLoaded1338119916359013771538
domInteractive98303707097357
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3219125153661
firstReactRender382685153778
getState9212516643
initialActions5012015225
loadScripts1313118016088813591493
setupStore1146613848
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -7.61 KiB (-0.17%)
  • ui: 1.48 KiB (0.02%)
  • common: 203 Bytes (0%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 53da464 | Date: 10/10/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±73ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±70ms) 🟢 | historical mean value: 738ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±14ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 73ms 1.00s 1.31s 1.29s 1.31s
domContentLoaded 731ms 70ms 695ms 1.00s 967ms 1.00s
firstPaint 77ms 14ms 60ms 196ms 88ms 196ms
firstContentfulPaint 77ms 14ms 60ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [53da464]
UI Startup Metrics (1273 ± 63 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1273113414256313091403
load109098312275711221202
domContentLoaded108397712215611171196
domInteractive19148891836
firstPaint68785122343510931188
backgroundConnect25824340917262272
firstReactRender2719127122744
getState13580111529
initialActions50254515
loadScripts83272496455863951
setupStore962431017
WebpackHomeuiStartup783663100065818893
load60554284875625756
domContentLoaded59653584074620747
domInteractive16116381433
firstPaint18352832181165704
backgroundConnect22104572734
firstReactRender25165483036
getState83284914
initialActions209237
loadScripts59453383073618745
setupStore74182912
FirefoxBrowserifyHomeuiStartup14501269211413015001673
load1229109814058212871370
domContentLoaded1228109714048212861370
domInteractive1013629652105241
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3120134153461
firstReactRender31265653245
getState839212629
initialActions5018619214
loadScripts1206107913778012611349
setupStore11413218759
WebpackHomeuiStartup15291330213513115791770
load1330118417769613811488
domContentLoaded1330118317759613811488
domInteractive962942357101236
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3017109163367
firstReactRender342682103772
getState8215216541
initialActions30617213
loadScripts1306116617479213521466
setupStore11310916746
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 69 Bytes (0%)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Import Token button does not work

2 participants