Skip to content

Commit

Permalink
chore: Add preinstalled example Snap (#27271)
Browse files Browse the repository at this point in the history
## **Description**

This adds a preinstalled example Snap to the Flask build for testing
purposes.

As requested by @legobeat I removed this change from #27057.  

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

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
  • Loading branch information
Mrtenz authored Sep 20, 2024
1 parent f41ef9b commit 27d8a54
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/scripts/snaps/preinstalled-snaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import EnsResolverSnap from '@metamask/ens-resolver-snap/dist/preinstalled-snap.
import AccountWatcherSnap from '@metamask/account-watcher/dist/preinstalled-snap.json';
///: BEGIN:ONLY_INCLUDE_IF(build-flask)
import BitcoinWalletSnap from '@metamask/bitcoin-wallet-snap/dist/preinstalled-snap.json';
import PreinstalledExampleSnap from '@metamask/preinstalled-example-snap/dist/preinstalled-snap.json';
///: END:ONLY_INCLUDE_IF

// The casts here are less than ideal but we expect the SnapController to validate the inputs.
Expand All @@ -13,6 +14,7 @@ const PREINSTALLED_SNAPS = Object.freeze<PreinstalledSnap[]>([
AccountWatcherSnap as PreinstalledSnap,
///: BEGIN:ONLY_INCLUDE_IF(build-flask)
BitcoinWalletSnap as unknown as PreinstalledSnap,
PreinstalledExampleSnap as unknown as PreinstalledSnap,
///: END:ONLY_INCLUDE_IF
]);

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
"@metamask/phishing-controller": "^12.0.1",
"@metamask/post-message-stream": "^8.0.0",
"@metamask/ppom-validator": "0.34.0",
"@metamask/preinstalled-example-snap": "^0.1.0",
"@metamask/profile-sync-controller": "^0.8.0",
"@metamask/providers": "^14.0.2",
"@metamask/queued-request-controller": "^2.0.0",
Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6044,6 +6044,15 @@ __metadata:
languageName: node
linkType: hard

"@metamask/preinstalled-example-snap@npm:^0.1.0":
version: 0.1.0
resolution: "@metamask/preinstalled-example-snap@npm:0.1.0"
dependencies:
"@metamask/snaps-sdk": "npm:^6.5.0"
checksum: 10/0540aa6c20b17171f3a3bcf9ea2a7be551d6abbf16de9bd55dce038c5602c62a3921c7e840b82a325b0db00f26b96f54568854bdcd091558bd3b8fa8c6188023
languageName: node
linkType: hard

"@metamask/profile-sync-controller@npm:^0.8.0":
version: 0.8.0
resolution: "@metamask/profile-sync-controller@npm:0.8.0"
Expand Down Expand Up @@ -26126,6 +26135,7 @@ __metadata:
"@metamask/phishing-warning": "npm:^4.0.0"
"@metamask/post-message-stream": "npm:^8.0.0"
"@metamask/ppom-validator": "npm:0.34.0"
"@metamask/preinstalled-example-snap": "npm:^0.1.0"
"@metamask/profile-sync-controller": "npm:^0.8.0"
"@metamask/providers": "npm:^14.0.2"
"@metamask/queued-request-controller": "npm:^2.0.0"
Expand Down

0 comments on commit 27d8a54

Please sign in to comment.