Skip to content

refactor: migrate eip-5792 & capabilities middleware handlers into monorepo#35541

Merged
ffmcgee725 merged 8 commits intomainfrom
jc/mmp-5698
Sep 4, 2025
Merged

refactor: migrate eip-5792 & capabilities middleware handlers into monorepo#35541
ffmcgee725 merged 8 commits intomainfrom
jc/mmp-5698

Conversation

@ffmcgee725
Copy link
Copy Markdown
Member

@ffmcgee725 ffmcgee725 commented Aug 30, 2025

Description

We identified duplication in JSON RPC middleware logic between the mobile and extension clients, particularly around the 5792 middleware stack and capability handling. During recent Wallet API and Perps integration discussions, the team agreed this presents an opportunity to abstract and centralize this logic into a core monorepo module.

The motivation here is to:

  • Reduce code duplication across mobile and extension clients
  • Create a client-agnostic foundation for capabilities (including auxiliary funds, capability advertising, and required assets)
  • Support the upcoming Metamask Pay (MM Pay) initiative by establishing a standardized middleware layer
  • Facilitate future multi-chain and auxiliary funds work without creating divergent patterns

So the work done on this PR aims to:

  1. Import 5792 middleware handlers from the new core package eip-5792-middleware that host shared middleware logic.
  2. Remove 5792 code from extension.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

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

Manual testing steps

  1. No user facing changes, but for extra confirmation, we can make sure using EIP 5792 methods via https://metamask.github.io/test-dapp/ still works!

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.

@metamaskbot metamaskbot added the team-wallet-api-platform-deprecated DEPRECATED: please use "team-wallet-integrations" instead label Aug 30, 2025
@socket-security
Copy link
Copy Markdown

socket-security bot commented Aug 30, 2025

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​metamask/​eip-5792-middleware@​1.0.0741007389100
Updated@​metamask/​chain-agnostic-permission@​1.1.0 ⏵ 1.1.1991007696100

View full report

@metamaskbot
Copy link
Copy Markdown
Collaborator

📊 Page Load Benchmark Results

Current Commit: 00f66b1 | Date: 8/30/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.29s (±89ms) 🟡 | historical mean value: 1.30s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 973ms (±81ms) 🟢 | historical mean value: 982ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 94ms (±44ms) 🟢 | historical mean value: 90ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.29s 89ms 1.24s 2.10s 1.37s 2.10s
domContentLoaded 973ms 81ms 930ms 1.72s 1.04s 1.72s
firstPaint 94ms 44ms 68ms 396ms 180ms 396ms
firstContentfulPaint 94ms 44ms 68ms 396ms 180ms 396ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@ffmcgee725
Copy link
Copy Markdown
Member Author

@metamaskbot update-policies

@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

@metamaskbot
Copy link
Copy Markdown
Collaborator

metamaskbot commented Aug 30, 2025

✨ Files requiring CODEOWNER review ✨

🧩 @MetaMask/extension-devs (4 files, +40 -0)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +10 -0
      • 📁 experimental/
        • 📄 policy.json +10 -0
      • 📁 flask/
        • 📄 policy.json +10 -0
      • 📁 main/
        • 📄 policy.json +10 -0

📜 @MetaMask/policy-reviewers (4 files, +40 -0)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +10 -0
      • 📁 experimental/
        • 📄 policy.json +10 -0
      • 📁 flask/
        • 📄 policy.json +10 -0
      • 📁 main/
        • 📄 policy.json +10 -0

Tip

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


🔗 @MetaMask/supply-chain (4 files, +40 -0)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +10 -0
      • 📁 experimental/
        • 📄 policy.json +10 -0
      • 📁 flask/
        • 📄 policy.json +10 -0
      • 📁 main/
        • 📄 policy.json +10 -0

@metamaskbot
Copy link
Copy Markdown
Collaborator

📊 Page Load Benchmark Results

Current Commit: ffe49f3 | Date: 8/30/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.28s (±63ms) 🟡 | historical mean value: 1.30s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 966ms (±54ms) 🟢 | historical mean value: 982ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 84ms (±13ms) 🟢 | historical mean value: 90ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.28s 63ms 1.24s 1.85s 1.35s 1.85s
domContentLoaded 966ms 54ms 936ms 1.45s 1.02s 1.45s
firstPaint 84ms 13ms 64ms 168ms 108ms 168ms
firstContentfulPaint 84ms 13ms 64ms 168ms 108ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [39b6219]
UI Startup Metrics (1214 ± 82 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1214108118278212531281
load105594316808211021123
domContentLoaded104893616718210951113
domInteractive17135561628
firstPaint71681167542810691119
backgroundConnect2372262667241250
firstReactRender24175062736
getState1252551622
initialActions617412612
loadScripts818707143581864885
setupStore96212913
WebpackHomeuiStartup20151467255726721832454
load16121182195620417551877
domContentLoaded15991177194920517381872
domInteractive171281121439
firstPaint1646830453204269
backgroundConnect4313434673476
firstReactRender84373185984295
getState3853208116277
initialActions7217117615
loadScripts15921175193720217321850
setupStore196256371527
FirefoxBrowserifyHomeuiStartup13461150181412014051573
load1170100214399212321347
domContentLoaded1170100214389212311347
domInteractive1093225347116227
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3318105173383
firstReactRender26226762833
getState62647613
initialActions501901937
loadScripts114598514098812091320
setupStore947310732
WebpackHomeuiStartup15471377212115716341851
load13221163164113114131608
domContentLoaded13211163164113114131607
domInteractive104313175598265
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect30205173543
firstReactRender42335754553
getState7312212611
initialActions311091135
loadScripts13001144162313113961589
setupStore10611812816
Benchmark value 238 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 25 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 7 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 251 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 12 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 43 exceeds gate value 40 for chrome webpack home mean backgroundConnect
Benchmark value 39 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 2455 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 277 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 15 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 33 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 227 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 83 exceeds gate value 70 for firefox browserify home p95 backgroundConnect
Benchmark value 7 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 32 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 105 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 30 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 43 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 265 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 53 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 5 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 281ms | Sum of p95 exceeds: 504.8ms
Sum of all benchmark exceeds: 785.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 252.83 KiB (5.44%)
  • ui: 0 Bytes (0%)
  • common: 97 Bytes (0%)

@metamaskbot
Copy link
Copy Markdown
Collaborator

📊 Page Load Benchmark Results

Current Commit: d49ae52 | Date: 8/30/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.28s (±53ms) 🟡 | historical mean value: 1.30s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 969ms (±47ms) 🟢 | historical mean value: 982ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±13ms) 🟢 | historical mean value: 90ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.28s 53ms 1.25s 1.77s 1.33s 1.77s
domContentLoaded 969ms 47ms 936ms 1.41s 1.01s 1.41s
firstPaint 85ms 13ms 72ms 168ms 108ms 168ms
firstContentfulPaint 85ms 13ms 72ms 168ms 108ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [b8d53ce]
UI Startup Metrics (1198 ± 61 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1198109114396112311304
load103893612465610731139
domContentLoaded103193012395710681129
domInteractive17135571636
firstPaint66980115641310481107
backgroundConnect2352252567239251
firstReactRender22164762337
getState14588131831
initialActions40223610
loadScripts80370299756840904
setupStore962631016
WebpackHomeuiStartup19911499266128021882438
load15981203204921317451927
domContentLoaded15861198203221017351907
domInteractive1712112161444
firstPaint1706345472191319
backgroundConnect3117293283055
firstReactRender97373468183323
getState3343187413276
initialActions52284615
loadScripts15821196201920917331894
setupStore186307391426
FirefoxBrowserifyHomeuiStartup13711210203112014321559
load1190103914628312371348
domContentLoaded1190103814628312371348
domInteractive1123235157125241
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3418237243652
firstReactRender26224742832
getState727910617
initialActions4117918312
loadScripts1165102214378312141319
setupStore949610717
WebpackHomeuiStartup15971402196115616981914
load13651184171413614751632
domContentLoaded13641183171413614751632
domInteractive1073330961100277
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect332292103744
firstReactRender43375644551
getState64192610
initialActions501041539
loadScripts13401162169313614481604
setupStore106879918
Benchmark value 235 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 252 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 10 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 33 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 276 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 15 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 113 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 35 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 241 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 12 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 108 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 44 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 277 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 51 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 9 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 278ms | Sum of p95 exceeds: 516.8ms
Sum of all benchmark exceeds: 794.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 252.83 KiB (5.44%)
  • ui: 0 Bytes (0%)
  • common: 97 Bytes (0%)

@metamaskbot
Copy link
Copy Markdown
Collaborator

📊 Page Load Benchmark Results

Current Commit: 312af2c | Date: 9/2/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.30s (±92ms) 🟡 | historical mean value: 1.30s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 985ms (±88ms) 🟢 | historical mean value: 980ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 99ms (±130ms) 🟢 | historical mean value: 94ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.30s 92ms 1.26s 1.89s 1.39s 1.89s
domContentLoaded 985ms 88ms 945ms 1.48s 1.07s 1.48s
firstPaint 99ms 130ms 72ms 1.38s 136ms 1.38s
firstContentfulPaint 99ms 130ms 72ms 1.38s 136ms 1.38s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@jiexi
Copy link
Copy Markdown
Member

jiexi commented Sep 2, 2025

beautiful. LGTM after preview build is replaced with actual release

@ffmcgee725
Copy link
Copy Markdown
Member Author

@metamaskbot update-policies

@metamaskbot
Copy link
Copy Markdown
Collaborator

📊 Page Load Benchmark Results

Current Commit: 6b55bc7 | Date: 9/3/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.29s (±49ms) 🟡 | historical mean value: 1.29s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 968ms (±46ms) 🟢 | historical mean value: 976ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 86ms (±13ms) 🟢 | historical mean value: 91ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.29s 49ms 1.26s 1.72s 1.34s 1.72s
domContentLoaded 968ms 46ms 942ms 1.38s 999ms 1.38s
firstPaint 86ms 13ms 68ms 144ms 124ms 144ms
firstContentfulPaint 86ms 13ms 68ms 144ms 124ms 144ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@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

@metamaskbot
Copy link
Copy Markdown
Collaborator

📊 Page Load Benchmark Results

Current Commit: 862d05b | Date: 9/3/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.29s (±39ms) 🟡 | historical mean value: 1.29s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 965ms (±36ms) 🟢 | historical mean value: 976ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 88ms (±27ms) 🟢 | historical mean value: 91ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.29s 39ms 1.26s 1.54s 1.36s 1.54s
domContentLoaded 965ms 36ms 941ms 1.20s 1.02s 1.20s
firstPaint 88ms 27ms 72ms 260ms 120ms 260ms
firstContentfulPaint 88ms 27ms 72ms 260ms 120ms 260ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [15c128d]
UI Startup Metrics (1229 ± 66 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1229109213636612771339
load107093712126311171177
domContentLoaded106293112076311121169
domInteractive17134351725
firstPaint62184120243610631158
backgroundConnect2422282849246256
firstReactRender24164762736
getState1353771624
initialActions50558513
loadScripts82870397263874932
setupStore95253916
WebpackHomeuiStartup20001521251725721242488
load15981238194819717291889
domContentLoaded15881224192619617211879
domInteractive171280131445
firstPaint1666232658193286
backgroundConnect3917332513270
firstReactRender85373396384311
getState3943188314284
initialActions5234469
loadScripts15811221191419217171867
setupStore156281271422
FirefoxBrowserifyHomeuiStartup13571156174111114111605
load1179101914538112321335
domContentLoaded1179101814538112321334
domInteractive1023233253103232
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3219112163475
firstReactRender27215152839
getState62548626
initialActions3143439
loadScripts1155100214358012111313
setupStore10410512827
WebpackHomeuiStartup15931372207913616651830
load13671159168712214411600
domContentLoaded13671158168712214411600
domInteractive103323045499272
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect30205573543
firstReactRender433011084650
getState63172612
initialActions3112238
loadScripts13451141166612314211581
setupStore11515616921
Benchmark value 1071 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1063 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 242 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 256 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 13 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 40 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 2488 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 284 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 32 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 27 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 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 232 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 75 exceeds gate value 70 for firefox browserify home p95 backgroundConnect
Benchmark value 26 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 9 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 104 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 44 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 3 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 272 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 8 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 282ms | Sum of p95 exceeds: 547.8ms
Sum of all benchmark exceeds: 829.8ms

Bundle size diffs [🚀 Bundle size reduced!]
  • background: -193.39 KiB (-4.16%)
  • ui: 24.71 KiB (0.32%)
  • common: 139.76 KiB (1.87%)

adonesky1 pushed a commit to MetaMask/core that referenced this pull request Sep 3, 2025
…po (#6422)

## Explanation

We identified duplication in JSON RPC middleware logic between the
mobile and extension clients, particularly around the 5792 middleware
stack and capability handling. During recent Wallet API and Perps
integration discussions, the team agreed this presents an opportunity to
abstract and centralize this logic into a core monorepo module.

The motivation here is to:

* Reduce code duplication across mobile and extension clients
* Create a client-agnostic foundation for capabilities (including
auxiliary funds, capability advertising, and required assets)
* Support the upcoming Metamask Pay (MM Pay) initiative by establishing
a standardized middleware layer
* Facilitate future multi-chain and auxiliary funds work without
creating divergent patterns

So the work done on this PR aims to:

1. Create a new core package `eip-5792-middleware` to host shared
middleware logic.
2. Extract the 5792 middleware logic and capability handlers from both
extension and mobile clients.
a.
[Extension](MetaMask/metamask-extension#35541)
   b. [Mobile](MetaMask/metamask-mobile#19064)
4. Refactor them to be client-agnostic and consumable by both clients.
5. Maintain feature parity with existing implementations while improving
modularity and testability.
6. Include initial unit tests and integration hooks.

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes
[#5698](MetaMask/MetaMask-planning#5698)
-->

* Fixes
[#5698](MetaMask/MetaMask-planning#5698)

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
@ffmcgee725
Copy link
Copy Markdown
Member Author

@metamaskbot update-policies

@ffmcgee725 ffmcgee725 marked this pull request as ready for review September 4, 2025 09:59
@ffmcgee725 ffmcgee725 requested review from a team as code owners September 4, 2025 09:59
@metamaskbot
Copy link
Copy Markdown
Collaborator

No policy changes

@metamaskbot
Copy link
Copy Markdown
Collaborator

📊 Page Load Benchmark Results

Current Commit: 8f06dcf | Date: 9/4/2025

📄 https://metamask.github.io/test-dapp/

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.29s (±98ms) 🟡 | historical mean value: 1.31s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 970ms (±96ms) 🟢 | historical mean value: 992ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 91ms (±36ms) 🟢 | historical mean value: 104ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.29s 98ms 1.25s 1.98s 1.37s 1.98s
domContentLoaded 970ms 96ms 940ms 1.65s 1.05s 1.65s
firstPaint 91ms 36ms 72ms 312ms 124ms 312ms
firstContentfulPaint 91ms 36ms 72ms 312ms 124ms 312ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [89b7cbc]
UI Startup Metrics (1208 ± 61 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1208108114096112461323
load104795012605510761133
domContentLoaded104094312575510721126
domInteractive17145261726
firstPaint68187115041310661116
backgroundConnect2422272627247256
firstReactRender23175662435
getState1354471630
initialActions50467614
loadScripts804694103054839883
setupStore961731015
WebpackHomeuiStartup19871529264528421862495
load15891235199121217411910
domContentLoaded15791223195121217321897
domInteractive171276131452
firstPaint1706238663193289
backgroundConnect3717329433268
firstReactRender86373265884311
getState235286521457
initialActions52223613
loadScripts15751221193921017301886
setupStore156239231421
FirefoxBrowserifyHomeuiStartup13821178174511914521619
load1203103715419712541374
domContentLoaded1202103715419712541374
domInteractive1053243164105252
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3219104143451
firstReactRender27225352937
getState73829620
initialActions31344311
loadScripts1179102015089412371344
setupStore948211828
WebpackHomeuiStartup15001321201213915621764
load12721132156010613371497
domContentLoaded12711131156010613361496
domInteractive92322955089250
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect32205473642
firstReactRender42336444449
getState63172710
initialActions6012317310
loadScripts12481113153810713131476
setupStore95344917
Benchmark value 243 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 256 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 14 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2495 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 32 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 27 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 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 252 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 11 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 28 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 32 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 42 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 250 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: 265ms | Sum of p95 exceeds: 466.8ms
Sum of all benchmark exceeds: 731.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.62 KiB (0.06%)
  • ui: -2 Bytes (0%)
  • common: 51 Bytes (0%)

@ffmcgee725 ffmcgee725 enabled auto-merge September 4, 2025 11:21
@ffmcgee725 ffmcgee725 added this pull request to the merge queue Sep 4, 2025
Merged via the queue into main with commit dc552ce Sep 4, 2025
147 of 149 checks passed
@ffmcgee725 ffmcgee725 deleted the jc/mmp-5698 branch September 4, 2025 15:02
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 2025
@metamaskbot metamaskbot added the release-13.4.0 Issue or pull request that will be included in release 13.4.0 label Sep 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.4.0 Issue or pull request that will be included in release 13.4.0 size-XL team-wallet-api-platform-deprecated DEPRECATED: please use "team-wallet-integrations" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants