Skip to content

Conversation

Prithpal-Sooriya
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya commented Oct 1, 2025

Description

Uncovered when running E2E tests. It seems that this 105.ts migration ended up removing/not adding the scopes property on our internal accounts.

This ensures we add back the scopes property.

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

https://www.loom.com/share/0ed66cf144c140fc84868d95e3500bb8?sid=20a77514-b5b6-40fe-9e3b-7a245955914d

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.

Copy link
Contributor

github-actions bot commented Oct 1, 2025

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 metamaskbot added team-assets INVALID-PR-TEMPLATE PR's body doesn't match template labels Oct 1, 2025
@github-actions github-actions bot added the size-S label Oct 1, 2025
Comment on lines -20 to -21
// omit the new field to re-use the original type for that migration.
export type InternalAccountV1 = Omit<InternalAccount, 'scopes'>;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is interesting. From the sounds of it, it seems like the original type when this migration was made did not have the scopes property.

But it doesn't look like any of our other migrations adds back this property (meaning older users who migrate / our e2e tests) never receive a scopes property?

},
methods: ETH_EOA_METHODS,
type: EthAccountType.Eoa,
scopes: [EthScope.Eoa],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rather than omitting the Scopes property, we are defaulting to the Eth EOA scope (similar to the Eth EOA type).

const matchesAccount = Object.values(internalAccounts.accounts).some(
(account) => {
const matchesScope = account.scopes?.some((scope) => {
const matchesScope = account.scopes.some((scope) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing this hotfix from my OG PR (was done to ensure CI was green)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: fae2ef2 | Date: 10/1/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±73ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 735ms (±70ms) 🟢 | historical mean value: 737ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±18ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 73ms 1.01s 1.35s 1.27s 1.35s
domContentLoaded 735ms 70ms 695ms 1.01s 943ms 1.01s
firstPaint 78ms 18ms 60ms 196ms 88ms 196ms
firstContentfulPaint 78ms 18ms 60ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [fae2ef2]
UI Startup Metrics (1238 ± 80 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1238109017138012801335
load106994515257411121163
domContentLoaded106194015037311011156
domInteractive17135461635
firstPaint62871154344310791158
backgroundConnect2532362787257268
firstReactRender2815174192844
getState15585111935
initialActions51365714
loadScripts816697126573857912
setupStore1052641220
WebpackHomeuiStartup24021756313828325862897
load19261409272425420662363
domContentLoaded19081405248324220572348
domInteractive2313147221885
firstPaint1877552279214334
backgroundConnect56133878244333
firstReactRender1074133471117300
getState2863445820198
initialActions72374713
loadScripts19031398247024020542336
setupStore2563265017201
FirefoxBrowserifyHomeuiStartup14231225180711514901630
load1227107014619413121420
domContentLoaded1227106914609413121420
domInteractive1063239163107251
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3320112143764
firstReactRender29244643037
getState839112712
initialActions4111256
loadScripts1203105214439212921358
setupStore1054981019
WebpackHomeuiStartup15591407201414816591860
load13251181181113514241561
domContentLoaded13251181181113514241560
domInteractive1063333062102303
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect32225873746
firstReactRender37324834044
getState8314614714
initialActions41637410
loadScripts13011159178813614031541
setupStore115141141023
Benchmark value 1239 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 253 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 28 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 16 exceeds gate value 15 for chrome browserify home mean getState
Benchmark value 6 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 268 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 35 exceeds gate value 33 for chrome browserify home p95 getState
Benchmark value 14 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 20 exceeds gate value 17 for chrome browserify home p95 setupStore
Benchmark value 2403 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1927 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1908 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 23 exceeds gate value 21 for chrome webpack home mean domInteractive
Benchmark value 57 exceeds gate value 40 for chrome webpack home mean backgroundConnect
Benchmark value 1903 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2897 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2363 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2349 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 85 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 335 exceeds gate value 334 for chrome webpack home p95 firstPaint
Benchmark value 334 exceeds gate value 90 for chrome webpack home p95 backgroundConnect
Benchmark value 198 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 2336 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 201 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 1423 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 33 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 251 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 6 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 107 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 33 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 303 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 10 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 1165ms | Sum of p95 exceeds: 2386.8ms
Sum of all benchmark exceeds: 3551.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 82 Bytes (0%)
  • ui: 1.96 KiB (0.03%)
  • common: -78 Bytes (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template size-S team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants