Skip to content

fix: Use withKeyring for accessing keyring entropy for Snaps - #40296

Merged
FrederikBolding merged 7 commits into
mainfrom
fb/snaps-with-keyring
Feb 23, 2026
Merged

fix: Use withKeyring for accessing keyring entropy for Snaps#40296
FrederikBolding merged 7 commits into
mainfrom
fb/snaps-with-keyring

Conversation

@FrederikBolding

@FrederikBolding FrederikBolding commented Feb 20, 2026

Copy link
Copy Markdown
Member

Description

Use withKeyring instead of getKeyringsByType for accessing the mnemonic for Snaps. withKeyring has more guarantees that should prevent race conditions and getKeyringsByType is deprecated for that same reason.

Additionally, move getMnemonic and getMnemonicSeed to utility functions that can be re-used.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null


Note

Medium Risk
Touches keyring entropy retrieval paths used by Snaps; incorrect assumptions about keyring shape/types could break Snap initialization or restricted methods despite being a scoped refactor.

Overview
Refactors Snap entropy access to use KeyringController:withKeyring instead of the deprecated getKeyringsByType, reducing the chance of races when retrieving the primary HD keyring’s mnemonic/seed.

The mnemonic/seed lookup logic is centralized into new reusable utilities (controllers/permissions/snaps/utils.ts) and wired into both Snap permission specifications and SnapController initialization; legacy metamask-controller helpers/tests for primary keyring mnemonic access are removed. Dependency/policy updates add a direct @metamask/eth-hd-keyring dependency and adjust LavaMoat policies accordingly.

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

@metamaskbotv2

metamaskbotv2 Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

✨ Files requiring CODEOWNER review ✨

🫰 @MetaMask/core-platform (4 files, +130 -117)
  • 📁 app/
    • 📁 scripts/
      • 📁 controller-init/
        • 📁 messengers/
          • 📁 snaps/
            • 📄 snap-controller-messenger.ts +3 -3
        • 📁 snaps/
          • 📄 snap-controller-init.ts +3 -20
      • 📁 controllers/
        • 📁 permissions/
          • 📁 snaps/
            • 📄 specifications.ts +3 -94
            • 📄 utils.ts +121 -0

📜 @MetaMask/policy-reviewers (12 files, +208 -176)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +15 -14
      • 📁 experimental/
        • 📄 policy.json +15 -14
      • 📁 flask/
        • 📄 policy.json +15 -14
      • 📁 main/
        • 📄 policy.json +15 -14
    • 📁 webpack/
      • 📁 mv2/
        • 📁 beta/
          • 📄 policy.json +16 -15
        • 📁 experimental/
          • 📄 policy.json +16 -15
        • 📁 flask/
          • 📄 policy.json +16 -15
        • 📁 main/
          • 📄 policy.json +16 -15
      • 📁 mv3/
        • 📁 beta/
          • 📄 policy.json +21 -15
        • 📁 experimental/
          • 📄 policy.json +21 -15
        • 📁 flask/
          • 📄 policy.json +21 -15
        • 📁 main/
          • 📄 policy.json +21 -15

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.

@metamaskbotv2

metamaskbotv2 Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor
Builds ready [0dba3d3]
⚡ Performance Benchmarks (1372 ± 100 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account29428305337
total29428305337
Confirm Txconfirm_tx6048860546055
total6048860546055
Bridge User Actionsbridge_load_page2628261274
bridge_load_asset_picker18932204229
bridge_search_token72623750757
total11452411591174
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup13721169161710014221536
load117397413919112211338
domContentLoaded116796913879012141327
domInteractive2515102192277
firstPaint167671247136218367
backgroundConnect19718225914198224
firstReactRender18114451923
initialActions104113
loadScripts98579212129010371142
setupStore1365471623
numNetworkReqs312288202285
Chrome Browserify Startup Power User HomeuiStartup344613989780184045216351
load11971047161511412301456
domContentLoaded11831034159911212111444
domInteractive3219123183159
firstPaint1678036575237282
backgroundConnect11752454899104016763268
firstReactRender23166562530
initialActions105111
loadScripts982839140311110121236
setupStore145225221322
numNetworkReqs81391462498120
Chrome Webpack Startup Standard HomeuiStartup81765212161088721001
load69557896891759855
domContentLoaded68957296191754847
domInteractive251596192180
firstPaint1215780393146288
backgroundConnect261892102744
firstReactRender17103751928
initialActions103112
loadScripts68757195490752840
setupStore1153441119
numNetworkReqs3122102222592
Chrome Webpack Startup Power User HomeuiStartup1281882296630813151739
load75766311681097781005
domContentLoaded7466521163110769999
domInteractive42211993339126
firstPaint1427835867152296
backgroundConnect2021311584211166337
firstReactRender22164342328
initialActions102011
loadScripts7436501155108766989
setupStore1242841520
numNetworkReqs1336026139154211
Firefox Browserify Startup Standard HomeuiStartup16331386259526416282213
load13691173227520713941741
domContentLoaded13671172227520713921736
domInteractive783195310483148
firstPaint------
backgroundConnect61293584260125
firstReactRender14115651416
initialActions102012
loadScripts13421150223920013711704
setupStore197156271543
numNetworkReqs3119102212590
Firefox Browserify Startup Power User HomeuiStartup302621068493100930853915
load17481353690792316812620
domContentLoaded17471353690792316812619
domInteractive199631756268178451
firstPaint------
backgroundConnect48012317323627691119
firstReactRender19146161928
initialActions103122
loadScripts17041332685091916262597
setupStore157151211203200572
numNetworkReqs893822836107166
Firefox Webpack Startup Standard HomeuiStartup17051443329326117131950
load14411223300124414671677
domContentLoaded14411222300124414621677
domInteractive902836353129151
firstPaint------
backgroundConnect56222113259109
firstReactRender16127061623
initialActions103122
loadScripts14181200296624114391625
setupStore247154302065
numNetworkReqs312093182783
Firefox Webpack Startup Power User HomeuiStartup298822631039785732153833
load16871365819369116742199
domContentLoaded16871364819269116742199
domInteractive18354789168187623
firstPaint------
backgroundConnect54011818263787181317
firstReactRender23179192433
initialActions213122
loadScripts16441334815169116272162
setupStore13222776137152439
numNetworkReqs85302314585214
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2191219221
srpButtonToSrpForm9229393
confirmSrpToPwForm2102222
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1501516
doneButtonToHomeScreen107636113881433
openAccountMenuToAccountListLoaded712511372347241
total886610488879027
Onboarding New WalletcreateWalletToSocialScreen2181219219
srpButtonToPwForm1041104106
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3403434
agreeButtonToOnboardingSuccess1501515
doneButtonToAssetList57590615705
total954909921087
Asset DetailsassetClickToPriceChart46146364
total46146364
Solana Asset DetailsassetClickToPriceChart4704747
total4704747
Import Srp HomeloginToHomeScreen19808520582071
openAccountMenuAfterLogin4684961
homeAfterImportWithNewWallet268618028372937
total479334349565384
Send TransactionsopenSendPageFromHome1711718
selectTokenToSendFormLoaded2012021
reviewTransactionToConfirmationPage85611864874
total89711908909
SwapopenSwapPageFromHome10719122130
fetchAndDisplaySwapQuotes46327346694758
total47407547994857
🌐 Dapp Page Load Benchmarks

Current Commit: 0dba3d3 | Date: 2/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±39ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 733ms (±36ms) 🟢 | historical mean value: 730ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±12ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 39ms 1.02s 1.36s 1.06s 1.36s
domContentLoaded 733ms 36ms 709ms 1.01s 741ms 1.01s
firstPaint 78ms 12ms 56ms 184ms 88ms 184ms
firstContentfulPaint 78ms 12ms 56ms 184ms 88ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 6.57 KiB (0.15%)
  • ui: 23.22 KiB (0.28%)
  • common: 2.84 KiB (0.03%)

/**
* Gets the mnemonic of the user's primary keyring.
*/
getPrimaryKeyringMnemonic() {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Dead code

@metamaskbotv2

metamaskbotv2 Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor
Builds ready [92a9d64]
⚡ Performance Benchmarks (1368 ± 103 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account27917289305
total27917289305
Confirm Txconfirm_tx6035760426042
total6035760426042
Bridge User Actionsbridge_load_page22229241267
bridge_load_asset_picker18542203248
bridge_search_token7037701714
total1098911061107
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup13681155166910314231563
load115594613819712181336
domContentLoaded114794213779612111321
domInteractive271695202385
firstPaint214591240226210364
backgroundConnect20819024913210234
firstReactRender17107871822
initialActions105113
loadScripts95875211759710231135
setupStore1253751320
numNetworkReqs312294202388
Chrome Browserify Startup Power User HomeuiStartup184713391022695617792094
load1126998169714411301510
domContentLoaded1111987169213911171425
domInteractive3319175233570
firstPaint172701425146234304
backgroundConnect3982457976820289342
firstReactRender24154872639
initialActions1011112
loadScripts91279914701359231218
setupStore1683661827
numNetworkReqs61371552564122
Chrome Webpack Startup Standard HomeuiStartup92372814491189731151
load7826431124102849949
domContentLoaded7766401115101843943
domInteractive3217131252594
firstPaint1256543171144234
backgroundConnect28186183046
firstReactRender2213200212235
initialActions1011112
loadScripts7736371105100840935
setupStore1373961324
numNetworkReqs312289192579
Chrome Webpack Startup Power User HomeuiStartup1191962158113912871465
load7006211050100692974
domContentLoaded691614104099682940
domInteractive34171352732113
firstPaint1236530859141244
backgroundConnect1646138252162281
firstReactRender22172932327
initialActions102111
loadScripts688612102896680930
setupStore1253131316
numNetworkReqs1083826450137236
Firefox Browserify Startup Standard HomeuiStartup16211367268419016471952
load13711174233115914001596
domContentLoaded13701174233115914001596
domInteractive782927044102157
firstPaint------
backgroundConnect57271802363102
firstReactRender13102321417
initialActions102122
loadScripts13441156230215313771551
setupStore196141261569
numNetworkReqs311992192788
Firefox Browserify Startup Power User HomeuiStartup26422042671452427273419
load15641224506841216092164
domContentLoaded15641224506741216092163
domInteractive1253753899126355
firstPaint------
backgroundConnect2451001028198233806
firstReactRender18145961725
initialActions207122
loadScripts15251207495640115712101
setupStore1278701173162534
numNetworkReqs64281663388119
Firefox Webpack Startup Standard HomeuiStartup18071516343832617852158
load15181285306826215151741
domContentLoaded15171285306726215151741
domInteractive1003021138131144
firstPaint------
backgroundConnect7828141713976111
firstReactRender16122931725
initialActions103122
loadScripts14921261302625914891681
setupStore258198341976
numNetworkReqs311984162776
Firefox Webpack Startup Power User HomeuiStartup27421960408644728993640
load16021294259030517172310
domContentLoaded16021293259030517162310
domInteractive13531768154119611
firstPaint------
backgroundConnect3181071359293273961
firstReactRender211573102230
initialActions206122
loadScripts15561273257028116682188
setupStore20810782228323702
numNetworkReqs64281863584126
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2171217219
srpButtonToSrpForm9129294
confirmSrpToPwForm2202222
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1511616
doneButtonToHomeScreen58015581604
openAccountMenuToAccountListLoaded760439478348074
total87912688298829
Onboarding New WalletcreateWalletToSocialScreen2202222222
srpButtonToPwForm1093109114
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3613636
agreeButtonToOnboardingSuccess1701717
doneButtonToAssetList55286567687
total940879551076
Asset DetailsassetClickToPriceChart3814040
total3814040
Solana Asset DetailsassetClickToPriceChart4724949
total4724949
Import Srp HomeloginToHomeScreen205114221862255
openAccountMenuAfterLogin54116568
homeAfterImportWithNewWallet244816825742656
total455216546614810
Send TransactionsopenSendPageFromHome1711818
selectTokenToSendFormLoaded2012121
reviewTransactionToConfirmationPage8525850860
total8886889897
SwapopenSwapPageFromHome13419150158
fetchAndDisplaySwapQuotes46457746154776
total47809147744926
🌐 Dapp Page Load Benchmarks

Current Commit: 92a9d64 | Date: 2/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±37ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±34ms) 🟢 | historical mean value: 730ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±12ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 37ms 1.01s 1.31s 1.05s 1.31s
domContentLoaded 720ms 34ms 697ms 976ms 738ms 976ms
firstPaint 77ms 12ms 60ms 184ms 88ms 184ms
firstContentfulPaint 77ms 12ms 60ms 184ms 88ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 6.68 KiB (0.15%)
  • ui: 23.56 KiB (0.28%)
  • common: 3.13 KiB (0.03%)

@metamaskbotv2

metamaskbotv2 Bot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor
Builds ready [e00dd31]
⚡ Performance Benchmarks (1374 ± 98 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2717273281
total2717273281
Confirm Txconfirm_tx60371060426051
total60371060426051
Bridge User Actionsbridge_load_page25810269269
bridge_load_asset_picker2138219219
bridge_search_token71920730749
total11836912441265
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup1374112916179814261554
load116495213839212121335
domContentLoaded115794613609012071317
domInteractive2816135212480
firstPaint158661153124206290
backgroundConnect20418525414207232
firstReactRender18123841926
initialActions108114
loadScripts97175611759010171133
setupStore1364061523
numNetworkReqs312288192483
Chrome Browserify Startup Power User HomeuiStartup17131353225216917612093
load11381019168015211241596
domContentLoaded11251011167214911101584
domInteractive39201853536139
firstPaint1627547584223299
backgroundConnect28425438420290326
firstReactRender25165082844
initialActions109113
loadScripts92180514681489021369
setupStore1876192134
numNetworkReqs59371522657137
Chrome Webpack Startup Standard HomeuiStartup86869312831098981095
load741609105288795886
domContentLoaded735606104688788880
domInteractive2916118222480
firstPaint1126041059126207
backgroundConnect26195582941
firstReactRender18123862031
initialActions102112
loadScripts732604104487786873
setupStore1255061318
numNetworkReqs312296202587
Chrome Webpack Startup Power User HomeuiStartup1230868201215913221471
load7146351366120702998
domContentLoaded7056281351119693992
domInteractive36181532834111
firstPaint1316347570150274
backgroundConnect17313033946169295
firstReactRender23174342529
initialActions104111
loadScripts7026251333116690982
setupStore1253961418
numNetworkReqs1084225950138205
Firefox Browserify Startup Standard HomeuiStartup15841369198114716091911
load13381157166511813801565
domContentLoaded13371157166511813791565
domInteractive74312404192145
firstPaint------
backgroundConnect5128124165578
firstReactRender13112021416
initialActions102012
loadScripts13141135164811513531541
setupStore196210331433
numNetworkReqs3120101212590
Firefox Browserify Startup Power User HomeuiStartup26092026389536327073395
load15331228231624615612110
domContentLoaded15321227231624615612109
domInteractive11436514105109348
firstPaint------
backgroundConnect21096878164200783
firstReactRender191499121726
initialActions103122
loadScripts14951212229323615142066
setupStore1397727179165541
numNetworkReqs60281433681140
Firefox Webpack Startup Standard HomeuiStartup17051418373035717062006
load14551213343932614311594
domContentLoaded14541213343832614311594
domInteractive983130146131151
firstPaint------
backgroundConnect8425218921862159
firstReactRender15122731623
initialActions102022
loadScripts14061193318025414071518
setupStore177140201343
numNetworkReqs311990172881
Firefox Webpack Startup Power User HomeuiStartup27141895389043628313683
load15781283257927917362141
domContentLoaded15771283257927917362141
domInteractive11831835129103355
firstPaint------
backgroundConnect272791293230245700
firstReactRender2415174182430
initialActions203123
loadScripts15401264255327217002122
setupStore17361172239229735
numNetworkReqs58261593683130
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2171218218
srpButtonToSrpForm9029192
confirmSrpToPwForm2102121
pwFormToMetricsScreen1511516
metricsToWalletReadyScreen1501516
doneButtonToHomeScreen96737613561462
openAccountMenuToAccountListLoaded728057176847870
total860524088078906
Onboarding New WalletcreateWalletToSocialScreen2201221222
srpButtonToPwForm11610120132
createPwToRecoveryScreen8099
skipBackupToMetricsScreen3523738
agreeButtonToOnboardingSuccess1601617
doneButtonToAssetList53853534624
total937479461011
Asset DetailsassetClickToPriceChart4144345
total4144345
Solana Asset DetailsassetClickToPriceChart4714748
total4714748
Import Srp HomeloginToHomeScreen19144419311993
openAccountMenuAfterLogin4014041
homeAfterImportWithNewWallet23932923892442
total439310444754552
Send TransactionsopenSendPageFromHome36155152
selectTokenToSendFormLoaded3094041
reviewTransactionToConfirmationPage86723878907
total9327939939
SwapopenSwapPageFromHome1387141147
fetchAndDisplaySwapQuotes530782862536381
total544082663686528
🌐 Dapp Page Load Benchmarks

Current Commit: e00dd31 | Date: 2/23/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 715ms (±36ms) 🟢 | historical mean value: 726ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 74ms (±10ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1.00s 1.31s 1.04s 1.31s
domContentLoaded 715ms 36ms 689ms 988ms 730ms 988ms
firstPaint 74ms 10ms 60ms 156ms 84ms 156ms
firstContentfulPaint 74ms 10ms 60ms 156ms 84ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: -112 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

!hasProperty(keyrings[0], 'seed') ||
!(keyrings[0].seed instanceof Uint8Array)
) {
const { seed } = (await initMessenger.call(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe a good opportunity to move this to a shared function.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

index: 0,
},
async ({ keyring }) => ({
seed: hasProperty(keyring, 'seed') ? keyring.seed : undefined,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does keyring have a type or something that we could check, instead of hasProperty?

@FrederikBolding FrederikBolding Feb 23, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think we can just cast. I would use the generic parameter for withKeyring but it isn't available via the messenger.

Comment thread app/scripts/metamask-controller.js

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread app/scripts/controllers/permissions/snaps/utils.ts
Comment thread app/scripts/controller-init/snaps/snap-controller-init.ts
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Feb 23, 2026
@FrederikBolding

Copy link
Copy Markdown
Member Author

@metamaskbot update-policies

@socket-security

socket-security Bot commented Feb 23, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​eth-hd-keyring@​13.0.0 ⏵ 13.1.09910010091 +6100

View full report

@metamaskbot

Copy link
Copy Markdown
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/experimental/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/flask/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/webpack/mv2/beta/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/experimental/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/flask/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv3/beta/policy.json changes differ from mv3/main/policy.json policy changes
👀 lavamoat/webpack/mv3/experimental/policy.json changes differ from mv3/main/policy.json policy changes
👀 lavamoat/webpack/mv3/flask/policy.json changes differ from mv3/main/policy.json policy changes

@metamaskbot
metamaskbot requested a review from a team as a code owner February 23, 2026 11:49
Comment thread app/scripts/controllers/permissions/snaps/utils.ts Outdated
Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>

@Mrtenz Mrtenz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Policies & code look good to me.

}
},
"@metamask/keyring-controller>@metamask/eth-hd-keyring": {
"@metamask/eth-hd-keyring": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Policy changes are caused by @metamask/eth-hd-keyring now being a direct dependency. No new capabilities introduced.

@metamaskbotv2

metamaskbotv2 Bot commented Feb 23, 2026

Copy link
Copy Markdown
Contributor
Builds ready [b8717b6]
⚡ Performance Benchmarks (1353 ± 108 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2665270271
total2665270271
Confirm Txconfirm_tx6024460226030
total6024460226030
Bridge User Actionsbridge_load_page23911244255
bridge_load_asset_picker15727160193
bridge_search_token6985699705
total10871510901106
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup13531120165210813881566
load114194913649511831322
domContentLoaded113494613599411791316
domInteractive261493192178
firstPaint222611258231216967
backgroundConnect20118224913207224
firstReactRender17123341924
initialActions104113
loadScripts9497561174939911126
setupStore1264251319
numNetworkReqs312298212293
Chrome Browserify Startup Power User HomeuiStartup17131409229615517772001
load11461008169615111291588
domContentLoaded11281000163713711151511
domInteractive3319117183483
firstPaint205721519160259367
backgroundConnect28525337022293330
firstReactRender23154862436
initialActions103111
loadScripts92281413951359051304
setupStore17772111837
numNetworkReqs58371512556124
Chrome Webpack Startup Standard HomeuiStartup87869311901049341099
load741617100797801929
domContentLoaded735612100196796922
domInteractive2816117192573
firstPaint1196240561160227
backgroundConnect29197093346
firstReactRender19124162130
initialActions104112
loadScripts73361099995794914
setupStore1263751223
numNetworkReqs312297202587
Chrome Webpack Startup Power User HomeuiStartup1229894168015813231517
load7006241051100694975
domContentLoaded691618104199683967
domInteractive34181482531101
firstPaint1276442369149264
backgroundConnect17012838247163283
firstReactRender22163842428
initialActions102011
loadScripts688616102997681958
setupStore1354971333
numNetworkReqs1073726251137222
Firefox Browserify Startup Standard HomeuiStartup16861411251821517332055
load14201187223518214691774
domContentLoaded14191187223418214681774
domInteractive923226947135178
firstPaint------
backgroundConnect63312162866127
firstReactRender14121711416
initialActions102112
loadScripts13911163220017714331737
setupStore218158271654
numNetworkReqs321996202693
Firefox Browserify Startup Power User HomeuiStartup27702154398038529003538
load15931280276427516492228
domContentLoaded15931280276327516492227
domInteractive138361036151123437
firstPaint------
backgroundConnect3311181221268381903
firstReactRender19157091923
initialActions103122
loadScripts15511257272426416052186
setupStore1398787204138640
numNetworkReqs64291883185113
Firefox Webpack Startup Standard HomeuiStartup16431381326124716631945
load13751146286317214101510
domContentLoaded13741141286317214101510
domInteractive782617942105148
firstPaint------
backgroundConnect7224141814061168
firstReactRender15123241524
initialActions103122
loadScripts13531130284117113921473
setupStore197182291360
numNetworkReqs311998192783
Firefox Webpack Startup Power User HomeuiStartup26871907705256327903377
load15831238574047716131999
domContentLoaded15831238574047716131999
domInteractive11930691111120332
firstPaint------
backgroundConnect26772900205281829
firstReactRender20163542228
initialActions203122
loadScripts15541217570547515871982
setupStore1599816198232701
numNetworkReqs63282153881128
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2171217218
srpButtonToSrpForm9019192
confirmSrpToPwForm2102121
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1501616
doneButtonToHomeScreen99834312471368
openAccountMenuToAccountListLoaded71429772247224
total840840387668832
Onboarding New WalletcreateWalletToSocialScreen2191219221
srpButtonToPwForm1053106109
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3734041
agreeButtonToOnboardingSuccess1611616
doneButtonToAssetList7522108351130
total113821212331514
Asset DetailsassetClickToPriceChart3623639
total3623639
Solana Asset DetailsassetClickToPriceChart5826060
total5826060
Import Srp HomeloginToHomeScreen221723024552534
openAccountMenuAfterLogin4144348
homeAfterImportWithNewWallet22793723212321
total442132947144824
Send TransactionsopenSendPageFromHome1811819
selectTokenToSendFormLoaded2122323
reviewTransactionToConfirmationPage86912874891
total9035902910
SwapopenSwapPageFromHome1118115123
fetchAndDisplaySwapQuotes4638946454645
total47342347494759
🌐 Dapp Page Load Benchmarks

Current Commit: b8717b6 | Date: 2/23/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±53ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 726ms (±50ms) 🟢 | historical mean value: 725ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±13ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 53ms 1.01s 1.32s 1.08s 1.32s
domContentLoaded 726ms 50ms 699ms 1.01s 759ms 1.01s
firstPaint 77ms 13ms 60ms 192ms 84ms 192ms
firstContentfulPaint 77ms 13ms 60ms 192ms 84ms 192ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -204 Bytes (0%)
  • ui: 11 Bytes (0%)
  • common: 3.06 KiB (0.03%)

@FrederikBolding
FrederikBolding added this pull request to the merge queue Feb 23, 2026
Merged via the queue into main with commit 324fd45 Feb 23, 2026
177 checks passed
@FrederikBolding
FrederikBolding deleted the fb/snaps-with-keyring branch February 23, 2026 15:01
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 23, 2026
@metamaskbot metamaskbot added the release-13.21.0 Issue or pull request that will be included in release 13.21.0 label Feb 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-13.21.0 Issue or pull request that will be included in release 13.21.0 size-M team-core-platform Core Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants