Skip to content

fix: network list migration#40579

Merged
n3ps merged 2 commits intomainfrom
n3ps/fix-networks-migration
Mar 5, 2026
Merged

fix: network list migration#40579
n3ps merged 2 commits intomainfrom
n3ps/fix-networks-migration

Conversation

@n3ps
Copy link
Copy Markdown
Contributor

@n3ps n3ps commented Mar 3, 2026

Description

Fixes migration 171 so enabledNetworkMap is merged by namespace + chain ID instead of shallow-overwriting namespace objects.

When both tokenNetworkFilter and selectedMultichainNetworkChainId resolve to eip155, existing EVM entries are now preserved and the selected chain is set to true, rather than collapsing the map to only the selected chain.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: fix: network list migration

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

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

Medium Risk
Updates state-migration logic for enabledNetworkMap, which can affect users’ persisted network enablement settings if the merge behavior is incorrect. Scope is small and covered by expanded unit tests for EVM and non-EVM cases.

Overview
Migration 171 now merges enabledNetworkMap by namespace while preserving existing chain entries, avoiding the previous shallow spread that could overwrite an entire namespace when both maps resolve to eip155.

Tests were updated/added to assert EVM token filter entries are preserved and that a selected custom EVM chain (and other expected chain IDs) is added/enabled correctly.

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

@n3ps n3ps requested a review from gambinish March 3, 2026 17:23
@n3ps n3ps added the team-core-extension-ux Core Extension UX team label Mar 3, 2026
@n3ps n3ps requested a review from a team March 3, 2026 17:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

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.

).toStrictEqual({
eip155: {
'0x1': true,
'0x89': false,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Evidence that script was not preserving networks

@n3ps n3ps marked this pull request as ready for review March 3, 2026 17:24
@github-actions github-actions bot added the size-S label Mar 3, 2026
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Mar 3, 2026

Builds ready [ab83042]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2742722772277277
total2742722772277277
Confirm Txconfirm_tx606060486075960656075
total606060486075960656075
Bridge User Actionsbridge_load_page26619937865277378
bridge_load_asset_picker17311423947203239
bridge_search_token7067047082707708
total110110891110911091110
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14521240199711114791647
load12211031163110012461410
domContentLoaded1212102416199712401393
domInteractive2917117182676
firstPaint171721182132224374
backgroundConnect21619838120218238
firstReactRender21144862233
initialActions208225
loadScripts101382214249610361192
setupStore1473561627
numNetworkReqs312291192283
Power User HomeuiStartup17331403237116617872130
load11501038167712811471480
domContentLoaded11361026166812611321453
domInteractive3319120183476
firstPaint1727751983227299
backgroundConnect29625942324304341
firstReactRender24155792646
initialActions104113
loadScripts92081914121229091261
setupStore1574261727
numNetworkReqs57371522356117
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192172222219222
srpButtonToSrpForm98941044100104
confirmSrpToPwForm22212312223
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen17161911819
doneButtonToHomeScreen60959662410610624
openAccountMenuToAccountListLoaded2926291329411129382941
total390538953913739103913
Onboarding New WalletcreateWalletToSocialScreen2202162232222223
srpButtonToPwForm1101061164111116
createPwToRecoveryScreen888088
skipBackupToMetricsScreen36363603636
agreeButtonToOnboardingSuccess16151601616
doneButtonToAssetList63658267534648675
total100686410838010691083
Asset DetailsassetClickToPriceChart50406075460
total50406075460
Solana Asset DetailsassetClickToPriceChart1087518141127181
total1087518141127181
Import Srp HomeloginToHomeScreen2169215021962021962196
openAccountMenuAfterLogin38354223942
homeAfterImportWithNewWallet27902453350939529113509
total47604584510820446845108
Send TransactionsopenSendPageFromHome20132442324
selectTokenToSendFormLoaded25183362833
reviewTransactionToConfirmationPage8488468533847853
total8928818997897899
SwapopenSwapPageFromHome1161051298119129
fetchAndDisplaySwapQuotes2905289429271229092927
total3014299930231030233023
🌐 Dapp Page Load Benchmarks

Current Commit: ab83042 | Date: 3/3/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±58ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 744ms (±56ms) 🟢 | historical mean value: 740ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±14ms) 🟢 | historical mean value: 87ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 58ms 1.03s 1.37s 1.10s 1.37s
domContentLoaded 744ms 56ms 714ms 1.05s 778ms 1.05s
firstPaint 81ms 14ms 64ms 208ms 92ms 208ms
firstContentfulPaint 81ms 14ms 64ms 208ms 92ms 208ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.26 KiB (0.04%)
  • ui: 26.4 KiB (0.32%)
  • common: -4.47 KiB (-0.04%)

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 3, 2026

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Mar 3, 2026

Builds ready [d1ec7f6]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account29326133124305331
total29326133124305331
Confirm Txconfirm_tx6077605761041860906104
total6077605761041860906104
Bridge User Actionsbridge_load_page21118722816226228
bridge_load_asset_picker20616525530219255
bridge_search_token70970072810714728
total111311091115311151115
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14521199178711615061653
load12191004151010412611418
domContentLoaded1212999150110212551382
domInteractive3017162232683
firstPaint1616848586222273
backgroundConnect21819140327223260
firstReactRender21145272431
initialActions209124
loadScripts1014808129610110531189
setupStore1466281727
numNetworkReqs312293202284
Power User HomeuiStartup19871397832679820072601
load12181054189615112521588
domContentLoaded12001046187914412291561
domInteractive3721152213872
firstPaint214801630170278362
backgroundConnect4022673532412342700
firstReactRender23165662534
initialActions105112
loadScripts977833162914010111329
setupStore1774472028
numNetworkReqs65271422175104
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2202192211220221
srpButtonToSrpForm94949509495
confirmSrpToPwForm22222202222
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen16151711717
doneButtonToHomeScreen65259671450687714
openAccountMenuToAccountListLoaded2926290529572029292957
total3946387740205239864020
Onboarding New WalletcreateWalletToSocialScreen2182172180218218
srpButtonToPwForm1131081215117121
createPwToRecoveryScreen989099
skipBackupToMetricsScreen36353713637
agreeButtonToOnboardingSuccess16151711617
doneButtonToAssetList58255263032591630
total9789391016289861016
Asset DetailsassetClickToPriceChart38373913939
total38373913939
Solana Asset DetailsassetClickToPriceChart74687737777
total74687737777
Import Srp HomeloginToHomeScreen20321783225518922472255
openAccountMenuAfterLogin493465125765
homeAfterImportWithNewWallet27792392329431229493294
total46764439498520146984985
Send TransactionsopenSendPageFromHome23212412324
selectTokenToSendFormLoaded19182112021
reviewTransactionToConfirmationPage8478478480848848
total8938878995897899
SwapopenSwapPageFromHome1131061268116126
fetchAndDisplaySwapQuotes2905288929321729072932
total301030013016730163016
🌐 Dapp Page Load Benchmarks

Current Commit: d1ec7f6 | Date: 3/3/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±39ms) 🟡 | historical mean value: 1.06s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±37ms) 🟢 | historical mean value: 743ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±15ms) 🟢 | historical mean value: 85ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 39ms 1.02s 1.34s 1.08s 1.34s
domContentLoaded 720ms 37ms 694ms 994ms 750ms 994ms
firstPaint 81ms 15ms 64ms 188ms 96ms 188ms
firstContentfulPaint 81ms 15ms 64ms 188ms 96ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 149 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

@n3ps n3ps enabled auto-merge March 5, 2026 18:10
@n3ps n3ps added this pull request to the merge queue Mar 5, 2026
Merged via the queue into main with commit 887465b Mar 5, 2026
339 of 342 checks passed
@n3ps n3ps deleted the n3ps/fix-networks-migration branch March 5, 2026 21:20
@metamaskbot metamaskbot added the release-13.23.0 Issue or pull request that will be included in release 13.23.0 label Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-13.23.0 Issue or pull request that will be included in release 13.23.0 size-S team-core-extension-ux Core Extension UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants