metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

fix: migration to remove dangling permissions for unconfigured chains

Open wenfix opened this issue 6 months ago • 3 comments

Description

We had an issue where removing a chain configuration wouldn't remove the dapp permissions for that chain. While that was fixed, we want to remove dangling permissions that still exist in state from before the fix via this migration.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4020

Manual testing steps

yarn jest app/scripts/migrations/167.test.ts

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.

wenfix avatar Jun 13 '25 14:06 wenfix

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.

github-actions[bot] avatar Jun 13 '25 14:06 github-actions[bot]

Builds ready [ee9cf3b]
UI Startup Metrics (1202 ± 82 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1202109617628212361327
load104493615477510781150
domContentLoaded103793115387510721145
domInteractive17149891631
firstPaint75977154741010661140
backgroundConnect74375724
firstReactRender20154042028
getState1453871929
initialActions001001
loadScripts795697128674828902
setupStore85274815
WebpackHomeuiStartup20611586250223622542424
load15991243196119017321911
domContentLoaded15931238195618917281902
domInteractive151157101348
firstPaint166591960189168271
backgroundConnect2310277262336
firstReactRender14046364109173349
getState1044051117
initialActions315134
loadScripts15901237194618717261891
setupStore4773219320312
FirefoxBrowserifyHomeuiStartup1348121716558313801524
load1197106014898012361373
domContentLoaded1197106014898012361373
domInteractive993622731115151
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20155762228
firstReactRender23212922427
getState956810838
initialActions002001
loadScripts1179104514747912191353
setupStore74546612
WebpackHomeuiStartup1526138317939216081700
load1324119715848913941504
domContentLoaded1323119715848913931503
domInteractive78301461485106
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22164352230
firstReactRender42296454549
getState95305927
initialActions002111
loadScripts1304118215648913751482
setupStore85222810
Benchmark value 24 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 48 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 312 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 38 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 42 exceeds gate value 38 for firefox webpack home mean firstReactRender
Sum of mean exceeds: 20ms | Sum of p95 exceeds: 267ms
Sum of all benchmark exceeds: 287ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 4 Bytes (0%)
  • ui: 2.81 KiB (0.04%)
  • common: 1.47 KiB (0.02%)

metamaskbot avatar Jun 13 '25 15:06 metamaskbot

Builds ready [f07ae83]
UI Startup Metrics (1246 ± 84 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1246111814728412861412
load108397213348011231238
domContentLoaded107796413308011191233
domInteractive17143841729
firstPaint76286134043110921217
backgroundConnect74324810
firstReactRender20163732128
getState1363171927
initialActions001001
loadScripts827713106878867979
setupStore85203814
WebpackHomeuiStartup21551667276222822822545
load16841307216218717891956
domContentLoaded16781303214518617851948
domInteractive1712100141450
firstPaint1546935056171282
backgroundConnect21123962434
firstReactRender16148368115310361
getState1143051223
initialActions315134
loadScripts16751301213418417831937
setupStore267318551827
FirefoxBrowserifyHomeuiStartup1357119416828113991496
load1205106814377612521356
domContentLoaded1205106814377612521356
domInteractive1023631035114151
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2313122132250
firstReactRender24215442430
getState84283811
initialActions002001
loadScripts1185105314157212381329
setupStore74374611
WebpackHomeuiStartup1503137117548715511690
load1307118315638713481493
domContentLoaded1306118215638713481493
domInteractive78321741884107
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21164652329
firstReactRender40275944346
getState85314910
initialActions002111
loadScripts1287116315478713281473
setupStore86466820
Benchmark value 1246 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1083 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1077 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 1412 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1238 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1234 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 1218 exceeds gate value 1180 for chrome browserify home p95 firstPaint
Benchmark value 979 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 2545 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Sum of mean exceeds: 44ms | Sum of p95 exceeds: 317ms
Sum of all benchmark exceeds: 361ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.01 KiB (0.04%)
  • ui: 2.81 KiB (0.04%)
  • common: 1.47 KiB (0.02%)

metamaskbot avatar Jun 13 '25 16:06 metamaskbot

Builds ready [c7dc130]
UI Startup Metrics (1224 ± 71 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1224110614407112651383
load106496212476610881202
domContentLoaded105895812416610821196
domInteractive17143751634
firstPaint679129125443210711200
backgroundConnect7431379
firstReactRender20175752030
getState1363671729
initialActions003001
loadScripts81070998965836946
setupStore84162913
WebpackHomeuiStartup20891630253821122342462
load16261263197516717361871
domContentLoaded16201258196516617321862
domInteractive161171111347
firstPaint1516234349163246
backgroundConnect21124262335
firstReactRender14447360109282350
getState174309421225
initialActions612882834
loadScripts16171256195316517311851
setupStore3473197117289
FirefoxBrowserifyHomeuiStartup1332119815337113751473
load1184102913797312341329
domContentLoaded1184102913797312331329
domInteractive943419927108135
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20137172126
firstReactRender24216052428
getState85394810
initialActions001001
loadScripts1166101113547312191305
setupStore64364611
WebpackHomeuiStartup1446128317339214811606
load1262113115538913011423
domContentLoaded1262113115538913011423
domInteractive75312292279106
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20154142125
firstReactRender38287054144
getState74282810
initialActions001011
loadScripts1244111615368912831406
setupStore7520278
Benchmark value 1383 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1203 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1196 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 1200 exceeds gate value 1180 for chrome browserify home p95 firstPaint
Benchmark value 947 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 34 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2463 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 289 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 39 exceeds gate value 38 for firefox webpack home mean firstReactRender
Sum of mean exceeds: 3ms | Sum of p95 exceeds: 307ms
Sum of all benchmark exceeds: 310ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.37 KiB (0.04%)
  • ui: 9.4 KiB (0.13%)
  • common: 2.36 KiB (0.03%)

metamaskbot avatar Jun 17 '25 07:06 metamaskbot

Builds ready [8ac7d84]
UI Startup Metrics (1209 ± 61 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1209111814306112641300
load104994512175910951147
domContentLoaded104394112125810861138
domInteractive17144351632
firstPaint716127122241610621132
backgroundConnect74304710
firstReactRender22154652233
getState1462871926
initialActions001000
loadScripts79769895758841900
setupStore85274817
WebpackHomeuiStartup21891692271822222992642
load16841280210719617852018
domContentLoaded16781276209519517802008
domInteractive171165121453
firstPaint1636864673181294
backgroundConnect2310324312338
firstReactRender21887419111345399
getState145269261326
initialActions315135
loadScripts16751275208519417791998
setupStore187308301827
FirefoxBrowserifyHomeuiStartup13761184165610114251581
load1212105513937912671337
domContentLoaded1212105413937912671337
domInteractive1183643764117290
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20135062132
firstReactRender23213422429
getState1157514854
initialActions001001
loadScripts1194104213807812511322
setupStore1048914850
WebpackHomeuiStartup15211352226717815252027
load13061160198715013281731
domContentLoaded13061160198615013281731
domInteractive88314606777265
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23155072340
firstReactRender40325234246
getState1455391333
initialActions002111
loadScripts12861145195814813071696
setupStore95446819
Benchmark value 2643 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2008 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 399 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 1998 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 119 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 290 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 54 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 50 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 2027 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1731 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1731 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 265 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 33 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 1696 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 13ms | Sum of p95 exceeds: 807ms
Sum of all benchmark exceeds: 820ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2 KiB (0.04%)
  • ui: 5 Bytes (0%)
  • common: -1 Bytes (0%)

metamaskbot avatar Jun 23 '25 13:06 metamaskbot

Closing as this was done in: https://github.com/MetaMask/metamask-extension/pull/33484

wenfix avatar Jun 23 '25 15:06 wenfix