Skip to content

chore: Bump Snaps packages #33018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

chore: Bump Snaps packages #33018

wants to merge 5 commits into from

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented May 16, 2025

Description

This bumps Snaps packages to the latest versions. Notable changes are:

  • Support for wallet_switchEthereumChain inside Snaps.
  • Support for SIP-31 onClientRequest handler.
  • New showTestnets property in snap_getPreferences.

Open in GitHub Codespaces

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.

@metamaskbot metamaskbot added the team-snaps-platform Snaps Platform team label May 16, 2025
Copy link

socket-security bot commented May 16, 2025

Copy link

socket-security bot commented May 16, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

View full report

@metamaskbot
Copy link
Collaborator

metamaskbot commented May 16, 2025

✨ Files requiring CODEOWNER review ✨

🧩 @MetaMask/extension-devs

  • lavamoat/browserify/beta/policy.json
  • lavamoat/browserify/flask/policy.json
  • lavamoat/browserify/main/policy.json
  • lavamoat/browserify/mmi/policy.json

📜 @MetaMask/policy-reviewers

Tip

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

  • lavamoat/browserify/beta/policy.json
  • lavamoat/browserify/flask/policy.json
  • lavamoat/browserify/main/policy.json
  • lavamoat/browserify/mmi/policy.json

🫰 @MetaMask/snaps-devs

  • test/e2e/flask/snaps/preinstalled-example.spec.ts
  • test/e2e/snaps/enums.js
  • test/e2e/snaps/test-snap-get-preferences.spec.ts

🔗 @MetaMask/supply-chain

  • lavamoat/browserify/beta/policy.json
  • lavamoat/browserify/flask/policy.json
  • lavamoat/browserify/main/policy.json
  • lavamoat/browserify/mmi/policy.json

@Mrtenz
Copy link
Member Author

Mrtenz commented May 16, 2025

@SocketSecurity ignore npm/@metamask/[email protected]

This is ours.

@Mrtenz
Copy link
Member Author

Mrtenz commented May 16, 2025

@metamaskbot update-policies

Copy link
Contributor

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
Copy link
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

@@ -324,14 +324,14 @@
"@metamask/rpc-errors": "^7.0.0",
"@metamask/safe-event-emitter": "^3.1.1",
"@metamask/scure-bip39": "^2.0.3",
"@metamask/selected-network-controller": "^19.0.0",
"@metamask/selected-network-controller": "^22.1.0",
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to handle any of these breaking changes?

Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't seem like it. 20.0.0 has breaking changes which were reverted in 21.0.0, and the other breaking changes are bumps to @metamask/network-controller.

Mrtenz and others added 5 commits May 16, 2025 18:13
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR adds E2E coverage for `initialConnections` by using the
preinstalled example Snap which has had `initialConnections`
functionality added and fixes some older E2Es.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/32954?quickstart=1)

## **Related issues**

Fixes: #24718
…32967)

## **Description**

(Waiting for a Snap platform release)

This PR binds the preference controller `showTestNetworks` property to
the `snap_getPreferences` hook.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/32967?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to test-snaps
2. Use the preferences snap
3. Verify that `showTestnets` is passed along.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**


![image](https://github.com/user-attachments/assets/f7498998-ec35-406b-9689-0c41ea518951)

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.
@Mrtenz Mrtenz force-pushed the mrtenz/snaps-107 branch from 48e20af to 52de4da Compare May 16, 2025 16:14
@Mrtenz
Copy link
Member Author

Mrtenz commented May 16, 2025

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

No policy changes

@metamaskbot
Copy link
Collaborator

Builds ready [52de4da]
UI Startup Metrics (1230 ± 63 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1230110514466312741330
load106096112065510891153
domContentLoaded105395111985610841148
domInteractive17133031725
firstPaint76381119340010671145
backgroundConnect84294823
firstReactRender20164152133
getState1363671827
initialActions001001
loadScripts81270795753836906
setupStore85162812
WebpackHomeuiStartup22071841262019323472481
load17091364221317518142010
domContentLoaded17021359220917418012000
domInteractive161265101448
firstPaint1516237053164267
backgroundConnect3110284303962
firstReactRender14144436107270332
getState174333331638
initialActions512162146
loadScripts16971357220717517971992
setupStore257258372551
FirefoxBrowserifyHomeuiStartup13451138171011514071561
load11871012148310112441382
domContentLoaded11871011148310112441381
domInteractive1004019725113140
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2413184212368
firstReactRender22195252226
getState13419730826
initialActions001001
loadScripts11671002146410112241364
setupStore6434369
WebpackHomeuiStartup15541382223913816381822
load13281175174511914111556
domContentLoaded13271173174511914101555
domInteractive85373413887137
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22157772331
firstReactRender35294953845
getState125188191031
initialActions102111
loadScripts13081156172912013901544
setupStore85385819
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 2207 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 2482 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 1992 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 13 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 26 exceeds gate value 24 for firefox browserify home p95 getState
Sum of mean exceeds: 17ms | Sum of p95 exceeds: 57ms
Sum of all benchmark exceeds: 74ms

Bundle size diffs [🚀 Bundle size reduced!]
  • background: -10.83 KiB (-0.2%)
  • ui: 3 Bytes (0%)
  • common: 195 Bytes (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-snaps-platform Snaps Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants