diff --git a/.circleci/config.yml b/.circleci/config.yml
index e8b002718940..f655188b0e27 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -146,8 +146,14 @@ workflows:
- prep-build-test
- test-e2e-chrome-snaps:
requires:
- - prep-build-test-flask
+ - prep-build-test
- test-e2e-firefox-snaps:
+ requires:
+ - prep-build-test
+ - test-e2e-chrome-snaps-flask:
+ requires:
+ - prep-build-test-flask
+ - test-e2e-firefox-snaps-flask:
requires:
- prep-build-test-flask
- test-e2e-chrome-mv3:
@@ -770,6 +776,80 @@ jobs:
destination: test-artifacts
test-e2e-firefox-snaps:
+ executor: node-browsers
+ parallelism: 4
+ steps:
+ - run: *shallow-git-clone
+ - run:
+ name: Install Firefox
+ command: ./.circleci/scripts/firefox-install.sh
+ - attach_workspace:
+ at: .
+ - run:
+ name: Move test build to dist
+ command: mv ./dist-test ./dist
+ - run:
+ name: Move test zips to builds
+ command: mv ./builds-test ./builds
+ - run:
+ name: test:e2e:firefox:snaps
+ command: |
+ if .circleci/scripts/test-run-e2e.sh
+ then
+ yarn test:e2e:firefox:snaps --retries 2 --debug --build-type=main
+ fi
+ no_output_timeout: 20m
+ - run:
+ name: Merge JUnit report
+ command: |
+ if [ "$(ls -A test/test-results/e2e)" ]; then
+ yarn test:e2e:report
+ fi
+ when: always
+ - store_artifacts:
+ path: test-artifacts
+ destination: test-artifacts
+ - store_test_results:
+ path: test/test-results/e2e.xml
+
+ test-e2e-chrome-snaps:
+ executor: node-browsers
+ parallelism: 4
+ steps:
+ - run: *shallow-git-clone
+ - run:
+ name: Re-Install Chrome
+ command: ./.circleci/scripts/chrome-install.sh
+ - attach_workspace:
+ at: .
+ - run:
+ name: Move test build to dist
+ command: mv ./dist-test ./dist
+ - run:
+ name: Move test zips to builds
+ command: mv ./builds-test ./builds
+ - run:
+ name: test:e2e:chrome:snaps
+ command: |
+ if .circleci/scripts/test-run-e2e.sh
+ then
+ yarn test:e2e:chrome:snaps --retries 2 --debug --build-type=main
+ fi
+ no_output_timeout: 20m
+ - run:
+ name: Merge JUnit report
+ command: |
+ if [ "$(ls -A test/test-results/e2e)" ]; then
+ yarn test:e2e:report
+ fi
+ when: always
+ - store_artifacts:
+ path: test-artifacts
+ destination: test-artifacts
+ - store_test_results:
+ path: test/test-results/e2e.xml
+
+ test-e2e-firefox-snaps-flask:
executor: node-browsers
parallelism: 4
steps:
@@ -806,7 +886,7 @@ jobs:
- store_test_results:
path: test/test-results/e2e.xml
- test-e2e-chrome-snaps:
+ test-e2e-chrome-snaps-flask:
executor: node-browsers
parallelism: 4
steps:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3e2752c27ec2..a19414559e1b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [11.0.0]
+### Added
+- [FLASK] Added snaps lifecycle hooks ([#20230](https://github.com/MetaMask/metamask-extension/pull/20230))
+
+### Changed
+- [FLASK] Unblock `personal_sign` for snaps ([#19998](https://github.com/MetaMask/metamask-extension/pull/19998))
+- [FLASK] Allow disabling markdown in snaps UI ([#20069](https://github.com/MetaMask/metamask-extension/pull/20069))
+
+### Fixed
+- [FLASK] Fix regression in transaction confirmation tabs ([#20267](https://github.com/MetaMask/metamask-extension/pull/20267))
+
## [10.35.1]
### Changed
- Store default gas settings by network ([#20576](https://github.com/MetaMask/metamask-extension/pull/20576), [#20632](https://github.com/MetaMask/metamask-extension/pull/20632))
@@ -3960,7 +3971,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Uncategorized
- Added the ability to restore accounts from seed words.
-[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.35.1...HEAD
+[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.0.0...HEAD
+[11.0.0]: https://github.com/MetaMask/metamask-extension/compare/v10.35.1...v11.0.0
[10.35.1]: https://github.com/MetaMask/metamask-extension/compare/v10.35.0...v10.35.1
[10.35.0]: https://github.com/MetaMask/metamask-extension/compare/v10.34.5...v10.35.0
[10.34.5]: https://github.com/MetaMask/metamask-extension/compare/v10.34.4...v10.34.5
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 0d9c8dbe2985..a06459b450cc 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -1555,7 +1555,7 @@
"message": "Export private key"
},
"extendWalletWithSnaps": {
- "message": "Extend the wallet experience."
+ "message": "Customize your wallet experience."
},
"externalExtension": {
"message": "External extension"
@@ -2838,7 +2838,7 @@
"message": "👓 We are making transactions easier to read."
},
"notificationsEmptyText": {
- "message": "Nothing to see here."
+ "message": "This is where you can find notifications from your installed snaps."
},
"notificationsHeader": {
"message": "Notifications"
@@ -2850,6 +2850,21 @@
"notificationsMarkAllAsRead": {
"message": "Mark all as read"
},
+ "notificationsOpenBetaSnapsActionText": {
+ "message": "Learn more"
+ },
+ "notificationsOpenBetaSnapsDescriptionOne": {
+ "message": "🎉 We're excited to announce the Open Beta of MetaMask Snaps!"
+ },
+ "notificationsOpenBetaSnapsDescriptionThree": {
+ "message": "Personalize your wallet with snaps built by the developer community!"
+ },
+ "notificationsOpenBetaSnapsDescriptionTwo": {
+ "message": "Snaps help you do more with MetaMask — like connect to more networks, see transaction insights, and get custom notifications."
+ },
+ "notificationsOpenBetaSnapsTitle": {
+ "message": "Introducing MetaMask Snaps"
+ },
"numberOfNewTokensDetectedPlural": {
"message": "$1 new tokens found in this account",
"description": "$1 is the number of new tokens detected"
@@ -3167,6 +3182,14 @@
"message": "Allow the snap to derive arbitrary keys unique to this snap, without exposing them. These keys are separate from your MetaMask account(s) and not related to your private keys or Secret Recovery Phrase. Other snaps cannot access this information.",
"description": "An extended description for the `snap_getEntropy` permission"
},
+ "permission_lifecycleHooks": {
+ "message": "Use lifecycle hooks.",
+ "description": "The description for the `endowment:lifecycle-hooks` permission"
+ },
+ "permission_lifecycleHooksDescription": {
+ "message": "Allow the snap to use lifecycle hooks to run code at specific times during its lifecycle.",
+ "description": "An extended description for the `endowment:lifecycle-hooks` permission"
+ },
"permission_longRunning": {
"message": "Run indefinitely.",
"description": "The description for the `endowment:long-running` permission"
@@ -4042,7 +4065,7 @@
"message": "The snap didn't return any insight"
},
"snapsPrivacyWarningFirstMessage": {
- "message": "You acknowledge that the snap that you are about to install is a Third Party Service as defined in the Consensys $1. Your use of Third Party Services is governed by separate terms and conditions set forth by the Third Party Service provider. You access, rely upon or use the Third Party Service at your own risk. Consensys disclaims all responsibility and liability for any losses on account of your use of Third Party Services.",
+ "message": "You acknowledge that any Snap that you install is a Third Party Service, unless otherwise identified, as defined in the Consensys $1. Your use of Third Party Services is governed by separate terms and conditions set forth by the Third Party Service provider. Consensys does not recommend the use of any Snap by any particular person for any particular reason. You access, rely upon or use the Third Party Service at your own risk. Consensys disclaims all responsibility and liability for any losses on account of your use of Third Party Services.",
"description": "First part of a message in popup modal displayed when installing a snap for the first time. $1 is terms of use link."
},
"snapsPrivacyWarningSecondMessage": {
@@ -4050,7 +4073,7 @@
"description": "Second part of a message in popup modal displayed when installing a snap for the first time."
},
"snapsPrivacyWarningThirdMessage": {
- "message": "Consensys has no access to information you share with these third parties.",
+ "message": "Consensys has no access to information you share with Third Party Services.",
"description": "Third part of a message in popup modal displayed when installing a snap for the first time."
},
"snapsSettingsDescription": {
diff --git a/app/images/introducing-snaps.svg b/app/images/introducing-snaps.svg
new file mode 100644
index 000000000000..84b0d5918f10
--- /dev/null
+++ b/app/images/introducing-snaps.svg
@@ -0,0 +1,93 @@
+
diff --git a/app/scripts/background.js b/app/scripts/background.js
index dd6848f550d6..3ec253382fdf 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -821,6 +821,13 @@ export function setupController(
});
}
///: END:ONLY_INCLUDE_IN
+
+ ///: BEGIN:ONLY_INCLUDE_IN(snaps)
+ // Updates the snaps registry and check for newly blocked snaps to block if the user has at least one snap installed.
+ if (Object.keys(controller.snapController.state.snaps).length > 0) {
+ controller.snapController.updateBlockedSnaps();
+ }
+ ///: END:ONLY_INCLUDE_IN
}
//
diff --git a/app/scripts/lib/createLoggerMiddleware.js b/app/scripts/lib/createLoggerMiddleware.js
index 0a67068421a1..86703c459eae 100644
--- a/app/scripts/lib/createLoggerMiddleware.js
+++ b/app/scripts/lib/createLoggerMiddleware.js
@@ -1,7 +1,8 @@
import log from 'loglevel';
/**
- * Returns a middleware that logs RPC activity
+ * Returns a middleware that logs RPC activity. Logging is detailed in
+ * development builds, but more limited in production builds.
*
* @param {{ origin: string }} opts - The middleware options
* @returns {Function}
@@ -14,12 +15,20 @@ export default function createLoggerMiddleware(opts) {
) {
next((/** @type {Function} */ cb) => {
if (res.error) {
- log.error('Error in RPC response:\n', res);
+ log.debug('Error in RPC response:\n', res);
}
if (req.isMetamaskInternal) {
return;
}
- log.info(`RPC (${opts.origin}):`, req, '->', res);
+ if (process.env.METAMASK_DEBUG) {
+ log.info(`RPC (${opts.origin}):`, req, '->', res);
+ } else {
+ log.info(
+ `RPC (${opts.origin}): ${req.method} -> ${
+ res.error ? 'error' : 'success'
+ }`,
+ );
+ }
cb();
});
};
diff --git a/app/scripts/lib/rpc-method-middleware/createMethodMiddleware.js b/app/scripts/lib/rpc-method-middleware/createMethodMiddleware.js
index e0f1b87f4939..842cee101f11 100644
--- a/app/scripts/lib/rpc-method-middleware/createMethodMiddleware.js
+++ b/app/scripts/lib/rpc-method-middleware/createMethodMiddleware.js
@@ -65,7 +65,9 @@ export function createMethodMiddleware(hooks) {
selectHooks(hooks, hookNames),
);
} catch (error) {
- console.error(error);
+ if (process.env.METAMASK_DEBUG) {
+ console.error(error);
+ }
return end(error);
}
}
@@ -101,7 +103,9 @@ export function createSnapMethodMiddleware(isSnap, hooks) {
selectHooks(hooks, hookNames),
);
} catch (error) {
- console.error(error);
+ if (process.env.METAMASK_DEBUG) {
+ console.error(error);
+ }
return end(error);
}
}
diff --git a/app/scripts/lib/setupSentry.js b/app/scripts/lib/setupSentry.js
index befecf21cf82..d4ed6eb60b28 100644
--- a/app/scripts/lib/setupSentry.js
+++ b/app/scripts/lib/setupSentry.js
@@ -82,6 +82,9 @@ export const SENTRY_BACKGROUND_STATE = {
CachedBalancesController: {
cachedBalances: false,
},
+ CronjobController: {
+ jobs: false,
+ },
CurrencyController: {
conversionDate: true,
conversionRate: true,
@@ -146,6 +149,9 @@ export const SENTRY_BACKGROUND_STATE = {
allNfts: false,
ignoredNfts: false,
},
+ NotificationController: {
+ notifications: false,
+ },
OnboardingController: {
completedOnboarding: true,
firstTimeFlowType: true,
@@ -213,6 +219,15 @@ export const SENTRY_BACKGROUND_STATE = {
userOptIn: true,
},
},
+ SnapController: {
+ snapErrors: false,
+ snapStates: false,
+ snaps: false,
+ },
+ SnapsRegistry: {
+ database: false,
+ lastUpdated: false,
+ },
SubjectMetadataController: {
subjectMetadata: false,
},
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 7063afea2164..2ece1aae0d0e 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -5,11 +5,16 @@ import { storeAsStream } from '@metamask/obs-store/dist/asStream';
import { JsonRpcEngine } from 'json-rpc-engine';
import { createEngineStream } from 'json-rpc-middleware-stream';
import { providerAsMiddleware } from '@metamask/eth-json-rpc-middleware';
-import { debounce } from 'lodash';
import {
KeyringController,
keyringBuilderFactory,
} from '@metamask/eth-keyring-controller';
+import {
+ debounce,
+ ///: BEGIN:ONLY_INCLUDE_IN(snaps)
+ throttle,
+ ///: END:ONLY_INCLUDE_IN
+} from 'lodash';
import createFilterMiddleware from 'eth-json-rpc-filters';
import createSubscriptionManager from 'eth-json-rpc-filters/subscriptionManager';
import { errorCodes as rpcErrorCodes, EthereumRpcError } from 'eth-rpc-errors';
@@ -923,10 +928,10 @@ export default class MetamaskController extends EventEmitter {
}),
setupSnapProvider: this.setupSnapProvider.bind(this),
};
- this.snapExecutionService =
- this.opts.overrides?.createSnapExecutionService?.(
- snapExecutionServiceArgs,
- ) || new IframeExecutionService(snapExecutionServiceArgs);
+
+ this.snapExecutionService = new IframeExecutionService(
+ snapExecutionServiceArgs,
+ );
const snapControllerMessenger = this.controllerMessenger.getRestricted({
name: 'SnapController',
@@ -934,6 +939,8 @@ export default class MetamaskController extends EventEmitter {
'ExecutionService:unhandledError',
'ExecutionService:outboundRequest',
'ExecutionService:outboundResponse',
+ 'SnapController:snapInstalled',
+ 'SnapController:snapUpdated',
],
allowedActions: [
`${this.permissionController.name}:getEndowments`,
@@ -957,6 +964,7 @@ export default class MetamaskController extends EventEmitter {
'ExecutionService:handleRpcRequest',
'SnapsRegistry:get',
'SnapsRegistry:getMetadata',
+ 'SnapsRegistry:update',
],
});
@@ -1057,8 +1065,8 @@ export default class MetamaskController extends EventEmitter {
refetchOnAllowlistMiss: requireAllowlist,
failOnUnavailableRegistry: requireAllowlist,
url: {
- registry: 'https://acl.execution.metamask.io/latest/registry.json',
- signature: 'https://acl.execution.metamask.io/latest/signature.json',
+ registry: 'https://acl.execution.consensys.io/latest/registry.json',
+ signature: 'https://acl.execution.consensys.io/latest/signature.json',
},
publicKey:
'0x025b65308f0f0fb8bc7f7ff87bfc296e0330eee5d3c1d1ee4a048b2fd6a86fa0a6',
@@ -1780,6 +1788,41 @@ export default class MetamaskController extends EventEmitter {
///: BEGIN:ONLY_INCLUDE_IN(snaps)
+ /**
+ * Tracks snaps export usage. Note: This function is throttled to 1 call per 60 seconds.
+ *
+ * @param {string} snapId - The ID of the snap the handler is being triggered on.
+ * @param {string} handler - The handler to trigger on the snap for the request.
+ */
+ _trackSnapExportUsage = throttle(
+ (snapId, handler) =>
+ this.metaMetricsController.trackEvent({
+ event: MetaMetricsEventName.SnapExportUsed,
+ category: MetaMetricsEventCategory.Snaps,
+ properties: {
+ snap_id: snapId,
+ export: handler,
+ },
+ }),
+ SECOND * 60,
+ );
+
+ /**
+ * Passes a JSON-RPC request object to the SnapController for execution.
+ *
+ * @param {object} args - A bag of options.
+ * @param {string} args.snapId - The ID of the recipient snap.
+ * @param {string} args.origin - The origin of the RPC request.
+ * @param {string} args.handler - The handler to trigger on the snap for the request.
+ * @param {object} args.request - The JSON-RPC request object.
+ * @returns The result of the JSON-RPC request.
+ */
+ handleSnapRequest(args) {
+ this._trackSnapExportUsage(args.snapId, args.handler);
+
+ return this.controllerMessenger.call('SnapController:handleRequest', args);
+ }
+
/**
* Constructor helper for getting Snap permission specifications.
*/
@@ -1801,10 +1844,7 @@ export default class MetamaskController extends EventEmitter {
this.controllerMessenger,
'SnapController:get',
),
- handleSnapRpcRequest: this.controllerMessenger.call.bind(
- this.controllerMessenger,
- 'SnapController:handleRequest',
- ),
+ handleSnapRpcRequest: this.handleSnapRequest.bind(this),
getSnapState: this.controllerMessenger.call.bind(
this.controllerMessenger,
'SnapController:getSnapState',
@@ -1956,7 +1996,7 @@ export default class MetamaskController extends EventEmitter {
`${this.snapController.name}:snapInstalled`,
(truncatedSnap) => {
this.metaMetricsController.trackEvent({
- event: 'Snap Installed',
+ event: MetaMetricsEventName.SnapInstalled,
category: MetaMetricsEventCategory.Snaps,
properties: {
snap_id: truncatedSnap.id,
@@ -1970,7 +2010,7 @@ export default class MetamaskController extends EventEmitter {
`${this.snapController.name}:snapUpdated`,
(newSnap, oldVersion) => {
this.metaMetricsController.trackEvent({
- event: 'Snap Updated',
+ event: MetaMetricsEventName.SnapUpdated,
category: MetaMetricsEventCategory.Snaps,
properties: {
snap_id: newSnap.id,
@@ -2013,6 +2053,15 @@ export default class MetamaskController extends EventEmitter {
}, []);
this.dismissNotifications(notificationIds);
+
+ this.metaMetricsController.trackEvent({
+ event: MetaMetricsEventName.SnapUninstalled,
+ category: MetaMetricsEventCategory.Snaps,
+ properties: {
+ snap_id: truncatedSnap.id,
+ version: truncatedSnap.version,
+ },
+ });
},
);
@@ -2093,9 +2142,21 @@ export default class MetamaskController extends EventEmitter {
const { vault } = this.keyringController.store.getState();
const isInitialized = Boolean(vault);
+ const flatState = this.memStore.getFlatState();
+
return {
isInitialized,
- ...this.memStore.getFlatState(),
+ ...flatState,
+ ///: BEGIN:ONLY_INCLUDE_IN(snaps)
+ // Snap state and source code is stripped out to prevent piping to the MetaMask UI.
+ snapStates: {},
+ snaps: Object.values(flatState.snaps ?? {}).reduce((acc, snap) => {
+ // eslint-disable-next-line no-unused-vars
+ const { sourceCode, ...rest } = snap;
+ acc[snap.id] = rest;
+ return acc;
+ }, {}),
+ ///: END:ONLY_INCLUDE_IN
};
}
@@ -2535,10 +2596,7 @@ export default class MetamaskController extends EventEmitter {
this.controllerMessenger,
'SnapController:remove',
),
- handleSnapRequest: this.controllerMessenger.call.bind(
- this.controllerMessenger,
- 'SnapController:handleRequest',
- ),
+ handleSnapRequest: this.handleSnapRequest.bind(this),
revokeDynamicSnapPermissions: this.controllerMessenger.call.bind(
this.controllerMessenger,
'SnapController:revokeDynamicPermissions',
diff --git a/builds.yml b/builds.yml
index 81dbe9ef5a92..4fad37914d37 100644
--- a/builds.yml
+++ b/builds.yml
@@ -16,12 +16,16 @@ buildTypes:
main:
features:
- build-main
+ - snaps
# Additional env variables that are specific to this build
env:
- INFURA_PROD_PROJECT_ID
- SEGMENT_PROD_WRITE_KEY
- INFURA_ENV_KEY_REF: INFURA_PROD_PROJECT_ID
- SEGMENT_WRITE_KEY_REF: SEGMENT_PROD_WRITE_KEY
+ - ALLOW_LOCAL_SNAPS: false
+ - REQUIRE_SNAPS_ALLOWLIST: true
+ - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/1.0.2/index.html
# Main build uses the default browser manifest
manifestOverrides: false
@@ -52,7 +56,7 @@ buildTypes:
- SEGMENT_FLASK_WRITE_KEY
- ALLOW_LOCAL_SNAPS: true
- REQUIRE_SNAPS_ALLOWLIST: false
- - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/0.38.1-flask.1/index.html
+ - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/0.38.1-flask.1/index.html
- SUPPORT_LINK: https://metamask-flask.zendesk.com/hc
- SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new
- INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID
@@ -71,7 +75,7 @@ buildTypes:
- SEGMENT_FLASK_WRITE_KEY
- ALLOW_LOCAL_SNAPS: true
- REQUIRE_SNAPS_ALLOWLIST: false
- - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/0.38.1-flask.1/index.html
+ - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/0.38.1-flask.1/index.html
- SUPPORT_LINK: https://metamask-flask.zendesk.com/hc
- SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new
- INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID
diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json
index c767a46e5aaf..706ed96dc170 100644
--- a/lavamoat/browserify/beta/policy.json
+++ b/lavamoat/browserify/beta/policy.json
@@ -1527,29 +1527,6 @@
"jest-canvas-mock>moo-color>color-name": true
}
},
- "@metamask/key-tree": {
- "packages": {
- "@metamask/key-tree>@metamask/utils": true,
- "@metamask/key-tree>@noble/ed25519": true,
- "@metamask/key-tree>@noble/hashes": true,
- "@metamask/key-tree>@noble/secp256k1": true,
- "@metamask/key-tree>@scure/base": true,
- "@metamask/scure-bip39": true
- }
- },
- "@metamask/key-tree>@metamask/utils": {
- "globals": {
- "TextDecoder": true,
- "TextEncoder": true
- },
- "packages": {
- "@metamask/key-tree>@noble/hashes": true,
- "browserify>buffer": true,
- "nock>debug": true,
- "semver": true,
- "superstruct": true
- }
- },
"@metamask/key-tree>@noble/ed25519": {
"globals": {
"crypto": true
@@ -1742,9 +1719,9 @@
"@metamask/rpc-methods": {
"packages": {
"@metamask/browser-passworder": true,
- "@metamask/key-tree": true,
"@metamask/key-tree>@noble/hashes": true,
"@metamask/permission-controller": true,
+ "@metamask/rpc-methods>@metamask/key-tree": true,
"@metamask/rpc-methods>@metamask/utils": true,
"@metamask/rpc-methods>nanoid": true,
"@metamask/snaps-ui": true,
@@ -1758,6 +1735,16 @@
"crypto.getRandomValues": true
}
},
+ "@metamask/rpc-methods>@metamask/key-tree": {
+ "packages": {
+ "@metamask/key-tree>@noble/ed25519": true,
+ "@metamask/key-tree>@noble/hashes": true,
+ "@metamask/key-tree>@noble/secp256k1": true,
+ "@metamask/key-tree>@scure/base": true,
+ "@metamask/rpc-methods>@metamask/utils": true,
+ "@metamask/scure-bip39": true
+ }
+ },
"@metamask/rpc-methods>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1925,9 +1912,9 @@
"document.createElement": true
},
"packages": {
- "@metamask/key-tree": true,
"@metamask/key-tree>@noble/hashes": true,
"@metamask/key-tree>@scure/base": true,
+ "@metamask/snaps-utils>@metamask/key-tree": true,
"@metamask/snaps-utils>@metamask/utils": true,
"@metamask/snaps-utils>cron-parser": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true,
@@ -1937,6 +1924,16 @@
"superstruct": true
}
},
+ "@metamask/snaps-utils>@metamask/key-tree": {
+ "packages": {
+ "@metamask/key-tree>@noble/ed25519": true,
+ "@metamask/key-tree>@noble/hashes": true,
+ "@metamask/key-tree>@noble/secp256k1": true,
+ "@metamask/key-tree>@scure/base": true,
+ "@metamask/scure-bip39": true,
+ "@metamask/snaps-utils>@metamask/utils": true
+ }
+ },
"@metamask/snaps-utils>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -4594,7 +4591,6 @@
},
"packages": {
"browserify>process": true,
- "browserify>util": true,
"semver>lru-cache": true
}
},
diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json
index 907a67b9b074..9169eaefd04f 100644
--- a/lavamoat/browserify/desktop/policy.json
+++ b/lavamoat/browserify/desktop/policy.json
@@ -1978,6 +1978,9 @@
"@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true,
"browserify>buffer": true,
+ "browserify>path-browserify": true,
+ "browserify>process": true,
+ "chalk": true,
"semver": true,
"superstruct": true
}
@@ -2150,14 +2153,20 @@
"@metamask/key-tree": true,
"@metamask/key-tree>@noble/hashes": true,
"@metamask/permission-controller": true,
- "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true,
- "@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": true,
+ "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-ui": true,
+ "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-utils": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
"eth-rpc-errors": true,
"superstruct": true
}
},
- "@metamask/snaps-controllers-flask>@metamask/snaps-utils": {
+ "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-ui": {
+ "packages": {
+ "@metamask/snaps-controllers-flask>@metamask/utils": true,
+ "superstruct": true
+ }
+ },
+ "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-utils": {
"globals": {
"TextDecoder": true,
"URL": true,
@@ -2178,13 +2187,38 @@
"@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true,
"browserify>buffer": true,
+ "browserify>path-browserify": true,
+ "browserify>process": true,
+ "chalk": true,
"semver": true,
"superstruct": true
}
},
- "@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": {
+ "@metamask/snaps-controllers-flask>@metamask/snaps-utils": {
+ "globals": {
+ "TextDecoder": true,
+ "URL": true,
+ "console.error": true,
+ "console.log": true,
+ "console.warn": true,
+ "document.body.appendChild": true,
+ "document.createElement": true
+ },
"packages": {
+ "@metamask/key-tree": true,
+ "@metamask/key-tree>@noble/hashes": true,
+ "@metamask/key-tree>@scure/base": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
+ "@metamask/snaps-utils-flask>is-svg": true,
+ "@metamask/snaps-utils>cron-parser": true,
+ "@metamask/snaps-utils>fast-json-stable-stringify": true,
+ "@metamask/snaps-utils>rfdc": true,
+ "@metamask/snaps-utils>validate-npm-package-name": true,
+ "browserify>buffer": true,
+ "browserify>path-browserify": true,
+ "browserify>process": true,
+ "chalk": true,
+ "semver": true,
"superstruct": true
}
},
@@ -2394,6 +2428,9 @@
"@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true,
"browserify>buffer": true,
+ "browserify>path-browserify": true,
+ "browserify>process": true,
+ "chalk": true,
"semver": true,
"superstruct": true
}
@@ -3564,6 +3601,22 @@
"document.createElement": true
}
},
+ "chalk": {
+ "packages": {
+ "chalk>ansi-styles": true,
+ "chalk>supports-color": true
+ }
+ },
+ "chalk>ansi-styles": {
+ "packages": {
+ "chalk>ansi-styles>color-convert": true
+ }
+ },
+ "chalk>ansi-styles>color-convert": {
+ "packages": {
+ "jest-canvas-mock>moo-color>color-name": true
+ }
+ },
"classnames": {
"globals": {
"classNames": "write",
@@ -5221,7 +5274,6 @@
},
"packages": {
"browserify>process": true,
- "browserify>util": true,
"semver>lru-cache": true
}
},
diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json
index 907a67b9b074..9169eaefd04f 100644
--- a/lavamoat/browserify/flask/policy.json
+++ b/lavamoat/browserify/flask/policy.json
@@ -1978,6 +1978,9 @@
"@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true,
"browserify>buffer": true,
+ "browserify>path-browserify": true,
+ "browserify>process": true,
+ "chalk": true,
"semver": true,
"superstruct": true
}
@@ -2150,14 +2153,20 @@
"@metamask/key-tree": true,
"@metamask/key-tree>@noble/hashes": true,
"@metamask/permission-controller": true,
- "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true,
- "@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": true,
+ "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-ui": true,
+ "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-utils": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
"eth-rpc-errors": true,
"superstruct": true
}
},
- "@metamask/snaps-controllers-flask>@metamask/snaps-utils": {
+ "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-ui": {
+ "packages": {
+ "@metamask/snaps-controllers-flask>@metamask/utils": true,
+ "superstruct": true
+ }
+ },
+ "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-utils": {
"globals": {
"TextDecoder": true,
"URL": true,
@@ -2178,13 +2187,38 @@
"@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true,
"browserify>buffer": true,
+ "browserify>path-browserify": true,
+ "browserify>process": true,
+ "chalk": true,
"semver": true,
"superstruct": true
}
},
- "@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": {
+ "@metamask/snaps-controllers-flask>@metamask/snaps-utils": {
+ "globals": {
+ "TextDecoder": true,
+ "URL": true,
+ "console.error": true,
+ "console.log": true,
+ "console.warn": true,
+ "document.body.appendChild": true,
+ "document.createElement": true
+ },
"packages": {
+ "@metamask/key-tree": true,
+ "@metamask/key-tree>@noble/hashes": true,
+ "@metamask/key-tree>@scure/base": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
+ "@metamask/snaps-utils-flask>is-svg": true,
+ "@metamask/snaps-utils>cron-parser": true,
+ "@metamask/snaps-utils>fast-json-stable-stringify": true,
+ "@metamask/snaps-utils>rfdc": true,
+ "@metamask/snaps-utils>validate-npm-package-name": true,
+ "browserify>buffer": true,
+ "browserify>path-browserify": true,
+ "browserify>process": true,
+ "chalk": true,
+ "semver": true,
"superstruct": true
}
},
@@ -2394,6 +2428,9 @@
"@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true,
"browserify>buffer": true,
+ "browserify>path-browserify": true,
+ "browserify>process": true,
+ "chalk": true,
"semver": true,
"superstruct": true
}
@@ -3564,6 +3601,22 @@
"document.createElement": true
}
},
+ "chalk": {
+ "packages": {
+ "chalk>ansi-styles": true,
+ "chalk>supports-color": true
+ }
+ },
+ "chalk>ansi-styles": {
+ "packages": {
+ "chalk>ansi-styles>color-convert": true
+ }
+ },
+ "chalk>ansi-styles>color-convert": {
+ "packages": {
+ "jest-canvas-mock>moo-color>color-name": true
+ }
+ },
"classnames": {
"globals": {
"classNames": "write",
@@ -5221,7 +5274,6 @@
},
"packages": {
"browserify>process": true,
- "browserify>util": true,
"semver>lru-cache": true
}
},
diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json
index c767a46e5aaf..1487df47adb9 100644
--- a/lavamoat/browserify/main/policy.json
+++ b/lavamoat/browserify/main/policy.json
@@ -1527,29 +1527,6 @@
"jest-canvas-mock>moo-color>color-name": true
}
},
- "@metamask/key-tree": {
- "packages": {
- "@metamask/key-tree>@metamask/utils": true,
- "@metamask/key-tree>@noble/ed25519": true,
- "@metamask/key-tree>@noble/hashes": true,
- "@metamask/key-tree>@noble/secp256k1": true,
- "@metamask/key-tree>@scure/base": true,
- "@metamask/scure-bip39": true
- }
- },
- "@metamask/key-tree>@metamask/utils": {
- "globals": {
- "TextDecoder": true,
- "TextEncoder": true
- },
- "packages": {
- "@metamask/key-tree>@noble/hashes": true,
- "browserify>buffer": true,
- "nock>debug": true,
- "semver": true,
- "superstruct": true
- }
- },
"@metamask/key-tree>@noble/ed25519": {
"globals": {
"crypto": true
@@ -1683,6 +1660,13 @@
"browserify>events": true
}
},
+ "@metamask/notification-controller": {
+ "packages": {
+ "@metamask/base-controller": true,
+ "@metamask/notification-controller>nanoid": true,
+ "@metamask/utils": true
+ }
+ },
"@metamask/notification-controller>nanoid": {
"globals": {
"crypto.getRandomValues": true
@@ -1739,12 +1723,77 @@
"eslint>optionator>fast-levenshtein": true
}
},
+ "@metamask/post-message-stream": {
+ "globals": {
+ "MessageEvent.prototype": true,
+ "WorkerGlobalScope": true,
+ "addEventListener": true,
+ "browser": true,
+ "chrome": true,
+ "location.origin": true,
+ "postMessage": true,
+ "removeEventListener": true
+ },
+ "packages": {
+ "@metamask/post-message-stream>readable-stream": true,
+ "@metamask/utils": true
+ }
+ },
+ "@metamask/post-message-stream>readable-stream": {
+ "packages": {
+ "@metamask/post-message-stream>readable-stream>process-nextick-args": true,
+ "@metamask/post-message-stream>readable-stream>safe-buffer": true,
+ "@metamask/post-message-stream>readable-stream>string_decoder": true,
+ "browserify>browser-resolve": true,
+ "browserify>events": true,
+ "browserify>process": true,
+ "browserify>timers-browserify": true,
+ "pumpify>inherits": true,
+ "readable-stream>core-util-is": true,
+ "readable-stream>isarray": true,
+ "readable-stream>util-deprecate": true
+ }
+ },
+ "@metamask/post-message-stream>readable-stream>process-nextick-args": {
+ "packages": {
+ "browserify>process": true
+ }
+ },
+ "@metamask/post-message-stream>readable-stream>safe-buffer": {
+ "packages": {
+ "browserify>buffer": true
+ }
+ },
+ "@metamask/post-message-stream>readable-stream>string_decoder": {
+ "packages": {
+ "@metamask/post-message-stream>readable-stream>safe-buffer": true
+ }
+ },
+ "@metamask/providers>@metamask/object-multiplex": {
+ "globals": {
+ "console.warn": true
+ },
+ "packages": {
+ "end-of-stream": true,
+ "pump>once": true,
+ "readable-stream": true
+ }
+ },
+ "@metamask/rate-limit-controller": {
+ "globals": {
+ "setTimeout": true
+ },
+ "packages": {
+ "@metamask/base-controller": true,
+ "eth-rpc-errors": true
+ }
+ },
"@metamask/rpc-methods": {
"packages": {
"@metamask/browser-passworder": true,
- "@metamask/key-tree": true,
"@metamask/key-tree>@noble/hashes": true,
"@metamask/permission-controller": true,
+ "@metamask/rpc-methods>@metamask/key-tree": true,
"@metamask/rpc-methods>@metamask/utils": true,
"@metamask/rpc-methods>nanoid": true,
"@metamask/snaps-ui": true,
@@ -1758,6 +1807,16 @@
"crypto.getRandomValues": true
}
},
+ "@metamask/rpc-methods>@metamask/key-tree": {
+ "packages": {
+ "@metamask/key-tree>@noble/ed25519": true,
+ "@metamask/key-tree>@noble/hashes": true,
+ "@metamask/key-tree>@noble/secp256k1": true,
+ "@metamask/key-tree>@scure/base": true,
+ "@metamask/rpc-methods>@metamask/utils": true,
+ "@metamask/scure-bip39": true
+ }
+ },
"@metamask/rpc-methods>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -1885,16 +1944,203 @@
"setTimeout": true
}
},
+ "@metamask/snaps-controllers": {
+ "globals": {
+ "URL": true,
+ "chrome.offscreen.createDocument": true,
+ "chrome.offscreen.hasDocument": true,
+ "clearTimeout": true,
+ "document.getElementById": true,
+ "fetch.bind": true,
+ "setTimeout": true
+ },
+ "packages": {
+ "@metamask/base-controller": true,
+ "@metamask/permission-controller": true,
+ "@metamask/post-message-stream": true,
+ "@metamask/providers>@metamask/object-multiplex": true,
+ "@metamask/rpc-methods": true,
+ "@metamask/snaps-controllers>@metamask/utils": true,
+ "@metamask/snaps-controllers>@xstate/fsm": true,
+ "@metamask/snaps-controllers>concat-stream": true,
+ "@metamask/snaps-controllers>gunzip-maybe": true,
+ "@metamask/snaps-controllers>nanoid": true,
+ "@metamask/snaps-controllers>readable-web-to-node-stream": true,
+ "@metamask/snaps-controllers>tar-stream": true,
+ "@metamask/snaps-utils": true,
+ "@metamask/snaps-utils>@metamask/snaps-registry": true,
+ "eth-rpc-errors": true,
+ "json-rpc-engine": true,
+ "json-rpc-middleware-stream": true,
+ "pump": true
+ }
+ },
"@metamask/snaps-controllers-flask>nanoid": {
"globals": {
"crypto.getRandomValues": true
}
},
+ "@metamask/snaps-controllers>@metamask/utils": {
+ "globals": {
+ "TextDecoder": true,
+ "TextEncoder": true
+ },
+ "packages": {
+ "@metamask/key-tree>@noble/hashes": true,
+ "browserify>buffer": true,
+ "nock>debug": true,
+ "semver": true,
+ "superstruct": true
+ }
+ },
+ "@metamask/snaps-controllers>concat-stream": {
+ "packages": {
+ "@metamask/snaps-controllers>concat-stream>readable-stream": true,
+ "browserify>buffer": true,
+ "browserify>concat-stream>typedarray": true,
+ "pumpify>inherits": true,
+ "terser>source-map-support>buffer-from": true
+ }
+ },
+ "@metamask/snaps-controllers>concat-stream>readable-stream": {
+ "packages": {
+ "browserify>browser-resolve": true,
+ "browserify>buffer": true,
+ "browserify>events": true,
+ "browserify>process": true,
+ "browserify>string_decoder": true,
+ "pumpify>inherits": true,
+ "readable-stream>util-deprecate": true
+ }
+ },
+ "@metamask/snaps-controllers>gunzip-maybe": {
+ "packages": {
+ "@metamask/snaps-controllers>gunzip-maybe>browserify-zlib": true,
+ "@metamask/snaps-controllers>gunzip-maybe>is-deflate": true,
+ "@metamask/snaps-controllers>gunzip-maybe>is-gzip": true,
+ "@metamask/snaps-controllers>gunzip-maybe>peek-stream": true,
+ "@metamask/snaps-controllers>gunzip-maybe>pumpify": true,
+ "@metamask/snaps-controllers>gunzip-maybe>through2": true
+ }
+ },
+ "@metamask/snaps-controllers>gunzip-maybe>browserify-zlib": {
+ "packages": {
+ "@metamask/snaps-controllers>gunzip-maybe>browserify-zlib>pako": true,
+ "browserify>assert": true,
+ "browserify>buffer": true,
+ "browserify>process": true,
+ "browserify>util": true,
+ "readable-stream": true
+ }
+ },
+ "@metamask/snaps-controllers>gunzip-maybe>peek-stream": {
+ "packages": {
+ "@metamask/snaps-controllers>gunzip-maybe>peek-stream>duplexify": true,
+ "@metamask/snaps-controllers>gunzip-maybe>peek-stream>through2": true,
+ "browserify>buffer": true,
+ "terser>source-map-support>buffer-from": true
+ }
+ },
+ "@metamask/snaps-controllers>gunzip-maybe>peek-stream>duplexify": {
+ "packages": {
+ "browserify>buffer": true,
+ "browserify>process": true,
+ "duplexify>stream-shift": true,
+ "end-of-stream": true,
+ "pumpify>inherits": true,
+ "readable-stream": true
+ }
+ },
+ "@metamask/snaps-controllers>gunzip-maybe>peek-stream>through2": {
+ "packages": {
+ "browserify>process": true,
+ "browserify>util": true,
+ "readable-stream": true,
+ "watchify>xtend": true
+ }
+ },
+ "@metamask/snaps-controllers>gunzip-maybe>pumpify": {
+ "packages": {
+ "@metamask/snaps-controllers>gunzip-maybe>pumpify>duplexify": true,
+ "@metamask/snaps-controllers>gunzip-maybe>pumpify>pump": true,
+ "pumpify>inherits": true
+ }
+ },
+ "@metamask/snaps-controllers>gunzip-maybe>pumpify>duplexify": {
+ "packages": {
+ "browserify>buffer": true,
+ "browserify>process": true,
+ "duplexify>stream-shift": true,
+ "end-of-stream": true,
+ "pumpify>inherits": true,
+ "readable-stream": true
+ }
+ },
+ "@metamask/snaps-controllers>gunzip-maybe>pumpify>pump": {
+ "packages": {
+ "browserify>browser-resolve": true,
+ "end-of-stream": true,
+ "pump>once": true
+ }
+ },
+ "@metamask/snaps-controllers>gunzip-maybe>through2": {
+ "packages": {
+ "browserify>process": true,
+ "browserify>util": true,
+ "readable-stream": true,
+ "watchify>xtend": true
+ }
+ },
"@metamask/snaps-controllers>nanoid": {
"globals": {
"crypto.getRandomValues": true
}
},
+ "@metamask/snaps-controllers>readable-web-to-node-stream": {
+ "packages": {
+ "@metamask/snaps-controllers>readable-web-to-node-stream>readable-stream": true
+ }
+ },
+ "@metamask/snaps-controllers>readable-web-to-node-stream>readable-stream": {
+ "packages": {
+ "browserify>browser-resolve": true,
+ "browserify>buffer": true,
+ "browserify>events": true,
+ "browserify>process": true,
+ "browserify>string_decoder": true,
+ "pumpify>inherits": true,
+ "readable-stream>util-deprecate": true
+ }
+ },
+ "@metamask/snaps-controllers>tar-stream": {
+ "packages": {
+ "@metamask/snaps-controllers>tar-stream>fs-constants": true,
+ "@metamask/snaps-controllers>tar-stream>readable-stream": true,
+ "browserify>buffer": true,
+ "browserify>process": true,
+ "browserify>string_decoder": true,
+ "browserify>util": true,
+ "end-of-stream": true,
+ "madge>ora>bl": true,
+ "pumpify>inherits": true
+ }
+ },
+ "@metamask/snaps-controllers>tar-stream>fs-constants": {
+ "packages": {
+ "browserify>constants-browserify": true
+ }
+ },
+ "@metamask/snaps-controllers>tar-stream>readable-stream": {
+ "packages": {
+ "browserify>browser-resolve": true,
+ "browserify>buffer": true,
+ "browserify>events": true,
+ "browserify>process": true,
+ "browserify>string_decoder": true,
+ "pumpify>inherits": true,
+ "readable-stream>util-deprecate": true
+ }
+ },
"@metamask/snaps-ui": {
"packages": {
"@metamask/snaps-ui>@metamask/utils": true,
@@ -1925,9 +2171,9 @@
"document.createElement": true
},
"packages": {
- "@metamask/key-tree": true,
"@metamask/key-tree>@noble/hashes": true,
"@metamask/key-tree>@scure/base": true,
+ "@metamask/snaps-utils>@metamask/key-tree": true,
"@metamask/snaps-utils>@metamask/utils": true,
"@metamask/snaps-utils>cron-parser": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true,
@@ -1937,6 +2183,36 @@
"superstruct": true
}
},
+ "@metamask/snaps-utils>@metamask/key-tree": {
+ "packages": {
+ "@metamask/key-tree>@noble/ed25519": true,
+ "@metamask/key-tree>@noble/hashes": true,
+ "@metamask/key-tree>@noble/secp256k1": true,
+ "@metamask/key-tree>@scure/base": true,
+ "@metamask/scure-bip39": true,
+ "@metamask/snaps-utils>@metamask/utils": true
+ }
+ },
+ "@metamask/snaps-utils>@metamask/snaps-registry": {
+ "packages": {
+ "@metamask/key-tree>@noble/secp256k1": true,
+ "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": true,
+ "superstruct": true
+ }
+ },
+ "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": {
+ "globals": {
+ "TextDecoder": true,
+ "TextEncoder": true
+ },
+ "packages": {
+ "@metamask/key-tree>@noble/hashes": true,
+ "browserify>buffer": true,
+ "nock>debug": true,
+ "semver": true,
+ "superstruct": true
+ }
+ },
"@metamask/snaps-utils>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -4062,6 +4338,24 @@
"Intl": true
}
},
+ "madge>ora>bl": {
+ "packages": {
+ "browserify>buffer": true,
+ "madge>ora>bl>readable-stream": true,
+ "pumpify>inherits": true
+ }
+ },
+ "madge>ora>bl>readable-stream": {
+ "packages": {
+ "browserify>browser-resolve": true,
+ "browserify>buffer": true,
+ "browserify>events": true,
+ "browserify>process": true,
+ "browserify>string_decoder": true,
+ "pumpify>inherits": true,
+ "readable-stream>util-deprecate": true
+ }
+ },
"nanoid": {
"globals": {
"crypto": true,
@@ -4328,6 +4622,115 @@
"proxyquire>fill-keys>is-object": true
}
},
+ "react-markdown": {
+ "globals": {
+ "console.warn": true
+ },
+ "packages": {
+ "prop-types": true,
+ "react": true,
+ "react-markdown>comma-separated-tokens": true,
+ "react-markdown>property-information": true,
+ "react-markdown>react-is": true,
+ "react-markdown>remark-parse": true,
+ "react-markdown>remark-rehype": true,
+ "react-markdown>space-separated-tokens": true,
+ "react-markdown>style-to-object": true,
+ "react-markdown>unified": true,
+ "react-markdown>unist-util-visit": true,
+ "react-markdown>vfile": true
+ }
+ },
+ "react-markdown>property-information": {
+ "packages": {
+ "watchify>xtend": true
+ }
+ },
+ "react-markdown>react-is": {
+ "globals": {
+ "console": true
+ }
+ },
+ "react-markdown>remark-parse": {
+ "packages": {
+ "react-markdown>remark-parse>mdast-util-from-markdown": true
+ }
+ },
+ "react-markdown>remark-parse>mdast-util-from-markdown": {
+ "packages": {
+ "react-markdown>remark-parse>mdast-util-from-markdown>mdast-util-to-string": true,
+ "react-markdown>remark-parse>mdast-util-from-markdown>micromark": true,
+ "react-markdown>remark-parse>mdast-util-from-markdown>unist-util-stringify-position": true,
+ "react-syntax-highlighter>refractor>parse-entities": true
+ }
+ },
+ "react-markdown>remark-parse>mdast-util-from-markdown>micromark": {
+ "packages": {
+ "react-syntax-highlighter>refractor>parse-entities": true
+ }
+ },
+ "react-markdown>remark-rehype": {
+ "packages": {
+ "react-markdown>remark-rehype>mdast-util-to-hast": true
+ }
+ },
+ "react-markdown>remark-rehype>mdast-util-to-hast": {
+ "globals": {
+ "console.warn": true
+ },
+ "packages": {
+ "react-markdown>remark-rehype>mdast-util-to-hast>mdast-util-definitions": true,
+ "react-markdown>remark-rehype>mdast-util-to-hast>mdurl": true,
+ "react-markdown>remark-rehype>mdast-util-to-hast>unist-builder": true,
+ "react-markdown>remark-rehype>mdast-util-to-hast>unist-util-generated": true,
+ "react-markdown>remark-rehype>mdast-util-to-hast>unist-util-position": true,
+ "react-markdown>unist-util-visit": true
+ }
+ },
+ "react-markdown>remark-rehype>mdast-util-to-hast>mdast-util-definitions": {
+ "packages": {
+ "react-markdown>unist-util-visit": true
+ }
+ },
+ "react-markdown>style-to-object": {
+ "packages": {
+ "react-markdown>style-to-object>inline-style-parser": true
+ }
+ },
+ "react-markdown>unified": {
+ "packages": {
+ "mocha>yargs-unparser>is-plain-obj": true,
+ "react-markdown>unified>bail": true,
+ "react-markdown>unified>extend": true,
+ "react-markdown>unified>is-buffer": true,
+ "react-markdown>unified>trough": true,
+ "react-markdown>vfile": true
+ }
+ },
+ "react-markdown>unist-util-visit": {
+ "packages": {
+ "react-markdown>unist-util-visit>unist-util-visit-parents": true
+ }
+ },
+ "react-markdown>unist-util-visit>unist-util-visit-parents": {
+ "packages": {
+ "react-markdown>unist-util-visit>unist-util-is": true
+ }
+ },
+ "react-markdown>vfile": {
+ "packages": {
+ "browserify>path-browserify": true,
+ "browserify>process": true,
+ "react-markdown>vfile>is-buffer": true,
+ "react-markdown>vfile>vfile-message": true,
+ "vinyl>replace-ext": true
+ }
+ },
+ "react-markdown>vfile>vfile-message": {
+ "packages": {
+ "react-markdown>vfile>unist-util-stringify-position": true
+ }
+ },
"react-popper": {
"globals": {
"document": true
@@ -4482,6 +4885,11 @@
"react": true
}
},
+ "react-syntax-highlighter>refractor>parse-entities": {
+ "globals": {
+ "document.createElement": true
+ }
+ },
"react-tippy": {
"globals": {
"Element": true,
@@ -4594,7 +5002,6 @@
},
"packages": {
"browserify>process": true,
- "browserify>util": true,
"semver>lru-cache": true
}
},
@@ -4646,6 +5053,11 @@
"define": true
}
},
+ "terser>source-map-support>buffer-from": {
+ "packages": {
+ "browserify>buffer": true
+ }
+ },
"uuid": {
"globals": {
"crypto": true,
@@ -4657,6 +5069,11 @@
"browserify>buffer": true
}
},
+ "vinyl>replace-ext": {
+ "packages": {
+ "browserify>path-browserify": true
+ }
+ },
"wait-on>rxjs>tslib": {
"globals": {
"define": true
diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json
index c56666bbd002..54ddf59d1c5c 100644
--- a/lavamoat/browserify/mmi/policy.json
+++ b/lavamoat/browserify/mmi/policy.json
@@ -1755,29 +1755,6 @@
"jest-canvas-mock>moo-color>color-name": true
}
},
- "@metamask/key-tree": {
- "packages": {
- "@metamask/key-tree>@metamask/utils": true,
- "@metamask/key-tree>@noble/ed25519": true,
- "@metamask/key-tree>@noble/hashes": true,
- "@metamask/key-tree>@noble/secp256k1": true,
- "@metamask/key-tree>@scure/base": true,
- "@metamask/scure-bip39": true
- }
- },
- "@metamask/key-tree>@metamask/utils": {
- "globals": {
- "TextDecoder": true,
- "TextEncoder": true
- },
- "packages": {
- "@metamask/key-tree>@noble/hashes": true,
- "browserify>buffer": true,
- "nock>debug": true,
- "semver": true,
- "superstruct": true
- }
- },
"@metamask/key-tree>@noble/ed25519": {
"globals": {
"crypto": true
@@ -1970,9 +1947,9 @@
"@metamask/rpc-methods": {
"packages": {
"@metamask/browser-passworder": true,
- "@metamask/key-tree": true,
"@metamask/key-tree>@noble/hashes": true,
"@metamask/permission-controller": true,
+ "@metamask/rpc-methods>@metamask/key-tree": true,
"@metamask/rpc-methods>@metamask/utils": true,
"@metamask/rpc-methods>nanoid": true,
"@metamask/snaps-ui": true,
@@ -1986,6 +1963,16 @@
"crypto.getRandomValues": true
}
},
+ "@metamask/rpc-methods>@metamask/key-tree": {
+ "packages": {
+ "@metamask/key-tree>@noble/ed25519": true,
+ "@metamask/key-tree>@noble/hashes": true,
+ "@metamask/key-tree>@noble/secp256k1": true,
+ "@metamask/key-tree>@scure/base": true,
+ "@metamask/rpc-methods>@metamask/utils": true,
+ "@metamask/scure-bip39": true
+ }
+ },
"@metamask/rpc-methods>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -2153,9 +2140,9 @@
"document.createElement": true
},
"packages": {
- "@metamask/key-tree": true,
"@metamask/key-tree>@noble/hashes": true,
"@metamask/key-tree>@scure/base": true,
+ "@metamask/snaps-utils>@metamask/key-tree": true,
"@metamask/snaps-utils>@metamask/utils": true,
"@metamask/snaps-utils>cron-parser": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true,
@@ -2165,6 +2152,16 @@
"superstruct": true
}
},
+ "@metamask/snaps-utils>@metamask/key-tree": {
+ "packages": {
+ "@metamask/key-tree>@noble/ed25519": true,
+ "@metamask/key-tree>@noble/hashes": true,
+ "@metamask/key-tree>@noble/secp256k1": true,
+ "@metamask/key-tree>@scure/base": true,
+ "@metamask/scure-bip39": true,
+ "@metamask/snaps-utils>@metamask/utils": true
+ }
+ },
"@metamask/snaps-utils>@metamask/utils": {
"globals": {
"TextDecoder": true,
@@ -4822,7 +4819,6 @@
},
"packages": {
"browserify>process": true,
- "browserify>util": true,
"semver>lru-cache": true
}
},
diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json
index 2b4fa98c957a..3c55390723c9 100644
--- a/lavamoat/build-system/policy.json
+++ b/lavamoat/build-system/policy.json
@@ -7649,9 +7649,6 @@
}
},
"semver": {
- "builtin": {
- "util.inspect": true
- },
"globals": {
"console.error": true,
"process": true
diff --git a/package.json b/package.json
index a3170b281280..a7332908fb8f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "metamask-crx",
- "version": "10.35.1",
+ "version": "11.0.0",
"private": true,
"repository": {
"type": "git",
@@ -244,7 +244,7 @@
"@metamask/etherscan-link": "^2.2.0",
"@metamask/gas-fee-controller": "^6.0.1",
"@metamask/jazzicon": "^2.0.0",
- "@metamask/key-tree": "^7.0.0",
+ "@metamask/key-tree": "^9.0.0",
"@metamask/logo": "^3.1.1",
"@metamask/message-manager": "^7.0.2",
"@metamask/metamask-eth-abis": "^3.0.0",
@@ -257,19 +257,19 @@
"@metamask/ppom-validator": "^0.0.1",
"@metamask/providers": "^11.1.0",
"@metamask/rate-limit-controller": "^3.0.0",
- "@metamask/rpc-methods": "^1.0.0-prerelease.1",
- "@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.36.1-flask.1",
+ "@metamask/rpc-methods": "^1.0.2",
+ "@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.37.2-flask.1",
"@metamask/safe-event-emitter": "^2.0.0",
"@metamask/scure-bip39": "^2.0.3",
"@metamask/signature-controller": "^4.0.1",
"@metamask/slip44": "^3.0.0",
"@metamask/smart-transactions-controller": "^3.1.0",
- "@metamask/snaps-controllers": "^1.0.0-prerelease.1",
- "@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.36.1-flask.1",
- "@metamask/snaps-ui": "^1.0.0-prerelease.1",
- "@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.36.1-flask.1",
- "@metamask/snaps-utils": "^1.0.0-prerelease.1",
- "@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.36.1-flask.1",
+ "@metamask/snaps-controllers": "^1.0.2",
+ "@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.38.0-flask.1",
+ "@metamask/snaps-ui": "^1.0.2",
+ "@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.37.3-flask.1",
+ "@metamask/snaps-utils": "^1.0.2",
+ "@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.38.0-flask.1",
"@metamask/subject-metadata-controller": "^2.0.0",
"@metamask/utils": "^5.0.0",
"@ngraveio/bc-ur": "^1.1.6",
diff --git a/shared/constants/metametrics.ts b/shared/constants/metametrics.ts
index 453ba97ea0c7..a6ca40670b77 100644
--- a/shared/constants/metametrics.ts
+++ b/shared/constants/metametrics.ts
@@ -599,6 +599,12 @@ export enum MetaMetricsEventName {
ActivityScreenOpened = 'Activity Screen Opened',
WhatsNewViewed = `What's New Viewed`,
WhatsNewClicked = `What's New Link Clicked`,
+ ///: BEGIN:ONLY_INCLUDE_IN(snaps)
+ SnapInstalled = 'Snap Installed',
+ SnapUninstalled = 'Snap Uninstalled',
+ SnapUpdated = 'Snap Updated',
+ SnapExportUsed = 'Snap Export Used',
+ ///: END:ONLY_INCLUDE_IN
}
export enum MetaMetricsEventAccountType {
diff --git a/shared/constants/permissions.test.js b/shared/constants/permissions.test.js
index 94f6388eff78..f1ef4a5563a2 100644
--- a/shared/constants/permissions.test.js
+++ b/shared/constants/permissions.test.js
@@ -9,10 +9,12 @@ import {
describe('EndowmentPermissions', () => {
it('has the expected permission keys', () => {
- // Since long-running is fenced out this causes problems with the test, we re-add it here.
+ // Since some permissions are fenced out, this causes problems with the
+ // test, so we re-add them here.
expect(Object.keys(EndowmentPermissions).sort()).toStrictEqual(
[
'endowment:long-running',
+ 'endowment:lifecycle-hooks',
...Object.keys(endowmentPermissionBuilders).filter(
(targetName) =>
!Object.keys(ExcludedSnapEndowments).includes(targetName),
diff --git a/shared/constants/snaps.ts b/shared/constants/snaps.ts
index f3f43e55734e..6ba3d9ab8d33 100644
--- a/shared/constants/snaps.ts
+++ b/shared/constants/snaps.ts
@@ -58,7 +58,7 @@ export const SNAPS_DERIVATION_PATHS: SnapsDerivationPath[] = [
{
path: ['m', `44'`, `1'`],
curve: 'secp256k1',
- name: 'Test BIP-32 Path (secp256k1)',
+ name: 'Testnet',
},
{
path: ['m', `44'`, `0'`],
@@ -115,11 +115,21 @@ export const SNAPS_DERIVATION_PATHS: SnapsDerivationPath[] = [
curve: 'secp256k1',
name: 'Bitcoin Cash',
},
+ {
+ path: ['m', `44'`, `637'`],
+ curve: 'ed25519',
+ name: 'Aptos',
+ },
{
path: ['m', `44'`, `714'`],
curve: 'secp256k1',
name: 'Binance (BNB)',
},
+ {
+ path: ['m', `44'`, `784'`],
+ curve: 'ed25519',
+ name: 'Sui',
+ },
{
path: ['m', `44'`, `931'`],
curve: 'secp256k1',
@@ -148,7 +158,27 @@ export const SNAPS_DERIVATION_PATHS: SnapsDerivationPath[] = [
{
path: ['m', `44'`, `1'`, `0'`],
curve: 'ed25519',
- name: 'NEAR Protocol Testnet',
+ name: 'Testnet',
+ },
+ {
+ path: ['m', `44'`, `472'`],
+ curve: 'ed25519',
+ name: 'Arweave',
+ },
+ {
+ path: ['m', `44'`, `12586'`],
+ curve: 'secp256k1',
+ name: 'Mina',
+ },
+ {
+ path: ['m', `44'`, `1729'`, `0'`, `0'`],
+ curve: 'ed25519',
+ name: 'Tezos',
+ },
+ {
+ path: ['m', `1789'`, `0'`],
+ curve: 'ed25519',
+ name: 'Vega',
},
];
///: END:ONLY_INCLUDE_IN
diff --git a/shared/constants/snaps/permissions.ts b/shared/constants/snaps/permissions.ts
index be3590ef40cb..3642e2187166 100644
--- a/shared/constants/snaps/permissions.ts
+++ b/shared/constants/snaps/permissions.ts
@@ -7,6 +7,7 @@ export const EndowmentPermissions = Object.freeze({
'endowment:webassembly': 'endowment:webassembly',
///: BEGIN:ONLY_INCLUDE_IN(build-flask)
'endowment:long-running': 'endowment:long-running',
+ 'endowment:lifecycle-hooks': 'endowment:lifecycle-hooks',
///: END:ONLY_INCLUDE_IN
} as const);
@@ -18,7 +19,7 @@ export const ExcludedSnapPermissions = Object.freeze({
'This permission is still in development and therefore not available.',
///: END:ONLY_INCLUDE_IN
eth_accounts:
- 'eth_accounts is disabled. For more information please see https://github.com/MetaMask/snaps-monorepo/issues/990.',
+ 'eth_accounts is disabled. For more information please see https://github.com/MetaMask/snaps/issues/990.',
});
export const ExcludedSnapEndowments = Object.freeze({
@@ -26,7 +27,9 @@ export const ExcludedSnapEndowments = Object.freeze({
'endowment:keyring':
'This endowment is still in development therefore not available.',
'endowment:long-running':
- 'endowment:long-running is deprecated. For more information please see https://github.com/MetaMask/snaps-monorepo/issues/945.',
+ 'endowment:long-running is deprecated. For more information please see https://github.com/MetaMask/snaps/issues/945.',
+ 'endowment:lifecycle-hooks':
+ 'This endowment is experimental and therefore not available.',
///: END:ONLY_INCLUDE_IN
});
diff --git a/shared/constants/terms.js b/shared/constants/terms.js
index 40521fa5904a..7437507561c5 100644
--- a/shared/constants/terms.js
+++ b/shared/constants/terms.js
@@ -1,2 +1,2 @@
-export const TERMS_OF_USE_LINK = 'https://consensys.net/terms-of-use/';
+export const TERMS_OF_USE_LINK = 'https://consensys.io/terms-of-use/';
export const TERMS_OF_USE_LAST_UPDATED = '2023-03-25';
diff --git a/shared/modules/provider-injection.js b/shared/modules/provider-injection.js
index 1fff0885433e..2a71762ad2a1 100644
--- a/shared/modules/provider-injection.js
+++ b/shared/modules/provider-injection.js
@@ -65,6 +65,7 @@ function documentElementCheck() {
*/
function blockedDomainCheck() {
const blockedDomains = [
+ 'execution.consensys.io',
'execution.metamask.io',
'uscourts.gov',
'dropbox.com',
diff --git a/shared/notifications/index.js b/shared/notifications/index.js
index f7f38ceec806..2d667208ffa2 100644
--- a/shared/notifications/index.js
+++ b/shared/notifications/index.js
@@ -1,4 +1,7 @@
// Messages and descriptions for these locale keys are in app/_locales/en/messages.json
+
+export const NOTIFICATION_OPEN_BETA_SNAPS = 26;
+
export const UI_NOTIFICATIONS = {
1: {
id: 1,
@@ -125,6 +128,14 @@ export const UI_NOTIFICATIONS = {
id: 24,
date: null,
},
+ [NOTIFICATION_OPEN_BETA_SNAPS]: {
+ id: Number(NOTIFICATION_OPEN_BETA_SNAPS),
+ date: null,
+ image: {
+ src: 'images/introducing-snaps.svg',
+ width: '100%',
+ },
+ },
};
export const getTranslatedUINotifications = (t, locale) => {
@@ -346,5 +357,20 @@ export const getTranslatedUINotifications = (t, locale) => {
)
: '',
},
+ [NOTIFICATION_OPEN_BETA_SNAPS]: {
+ ...UI_NOTIFICATIONS[NOTIFICATION_OPEN_BETA_SNAPS],
+ title: t('notificationsOpenBetaSnapsTitle'),
+ description: [
+ t('notificationsOpenBetaSnapsDescriptionOne'),
+ t('notificationsOpenBetaSnapsDescriptionTwo'),
+ t('notificationsOpenBetaSnapsDescriptionThree'),
+ ],
+ actionText: t('notificationsOpenBetaSnapsActionText'),
+ date: UI_NOTIFICATIONS[NOTIFICATION_OPEN_BETA_SNAPS].date
+ ? new Intl.DateTimeFormat(formattedLocale).format(
+ new Date(UI_NOTIFICATIONS[NOTIFICATION_OPEN_BETA_SNAPS].date),
+ )
+ : '',
+ },
};
};
diff --git a/test/e2e/run-all.js b/test/e2e/run-all.js
index 799177b775ce..b066670d3214 100644
--- a/test/e2e/run-all.js
+++ b/test/e2e/run-all.js
@@ -4,6 +4,7 @@ const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const { runInShell } = require('../../development/lib/run-command');
const { exitWithError } = require('../../development/lib/exit-with-error');
+const { loadBuildTypesConfig } = require('../../development/lib/build-type');
const getTestPathsForTestDir = async (testDir) => {
const testFilenames = await fs.readdir(testDir, { withFileTypes: true });
@@ -60,6 +61,11 @@ async function main() {
description: `run mv3 specific e2e tests`,
type: 'boolean',
})
+ .option('build-type', {
+ description: `Sets the build-type to test for. This may filter out tests.`,
+ type: 'string',
+ choices: Object.keys(loadBuildTypesConfig().buildTypes),
+ })
.option('retries', {
description:
'Set how many times the test should be retried upon failure.',
@@ -69,13 +75,25 @@ async function main() {
.strict()
.help('help');
- const { browser, debug, retries, snaps, mv3 } = argv;
+ const { browser, debug, retries, snaps, mv3, buildType } = argv;
let testPaths;
if (snaps) {
const testDir = path.join(__dirname, 'snaps');
testPaths = await getTestPathsForTestDir(testDir);
+
+ if (buildType && buildType !== 'flask') {
+ // These tests should only be ran on Flask for now
+ const filteredTests = [
+ 'test-snap-manageAccount.spec.js',
+ 'test-snap-rpc.spec.js',
+ 'test-snap-lifecycle.spec.js',
+ ];
+ testPaths = testPaths.filter((p) =>
+ filteredTests.every((filteredTest) => !p.endsWith(filteredTest)),
+ );
+ }
} else {
const testDir = path.join(__dirname, 'tests');
testPaths = [
diff --git a/test/e2e/snaps/enums.js b/test/e2e/snaps/enums.js
index d19c7496766f..6ec77de3087e 100644
--- a/test/e2e/snaps/enums.js
+++ b/test/e2e/snaps/enums.js
@@ -1,5 +1,6 @@
module.exports = {
- TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/test-snaps/5.5.0/',
+ TEST_SNAPS_WEBSITE_URL:
+ 'https://metamask.github.io/snaps/test-snaps/0.38.0-flask.1/',
TEST_SNAPS_SIMPLE_KEYRING_WEBSITE_URL:
- 'https://metamask.github.io/snap-simple-keyring/latest/',
+ 'https://metamask.github.io/snap-simple-keyring/0.1.4/',
};
diff --git a/test/e2e/snaps/test-snap-bip-32.spec.js b/test/e2e/snaps/test-snap-bip-32.spec.js
index 0cd744f2cc87..5b69c576619c 100644
--- a/test/e2e/snaps/test-snap-bip-32.spec.js
+++ b/test/e2e/snaps/test-snap-bip-32.spec.js
@@ -31,10 +31,10 @@ describe('Test Snap bip-32', function () {
await driver.delay(1000);
// find and scroll to the bip32 test and connect
- const snapButton1 = await driver.findElement('#connectBip32');
+ const snapButton1 = await driver.findElement('#connectbip32');
await driver.scrollToElement(snapButton1);
await driver.delay(1000);
- await driver.clickElement('#connectBip32');
+ await driver.clickElement('#connectbip32');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -84,7 +84,7 @@ describe('Test Snap bip-32', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectBip32',
+ css: '#connectbip32',
text: 'Reconnect to BIP-32 Snap',
});
diff --git a/test/e2e/snaps/test-snap-bip-44.spec.js b/test/e2e/snaps/test-snap-bip-44.spec.js
index 5df417861719..48b2bbfc26a3 100644
--- a/test/e2e/snaps/test-snap-bip-44.spec.js
+++ b/test/e2e/snaps/test-snap-bip-44.spec.js
@@ -32,10 +32,10 @@ describe('Test Snap bip-44', function () {
await driver.delay(1000);
// find and scroll to the bip44 test and connect
- const snapButton1 = await driver.findElement('#connectBip44Snap');
+ const snapButton1 = await driver.findElement('#connectbip44');
await driver.scrollToElement(snapButton1);
await driver.delay(1000);
- await driver.clickElement('#connectBip44Snap');
+ await driver.clickElement('#connectbip44');
await driver.delay(1000);
// switch to metamask extension and click connect and approve
@@ -53,6 +53,9 @@ describe('Test Snap bip-44', function () {
tag: 'button',
});
await driver.waitForSelector({ text: 'Install' });
+
+ await driver.clickElementSafe('[data-testid="snap-install-scroll"]');
+
await driver.clickElement({
text: 'Install',
tag: 'button',
@@ -61,6 +64,7 @@ describe('Test Snap bip-44', function () {
// deal with permissions popover
await driver.delay(500);
await driver.clickElement('#key-access-bip44-1-0');
+ await driver.clickElement('#key-access-bip44-3-1');
await driver.clickElement({
text: 'Confirm',
tag: 'button',
@@ -76,7 +80,7 @@ describe('Test Snap bip-44', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectBip44Snap',
+ css: '#connectbip44',
text: 'Reconnect to BIP-44 Snap',
});
diff --git a/test/e2e/snaps/test-snap-cronjob.spec.js b/test/e2e/snaps/test-snap-cronjob.spec.js
index 7fb31e361f6a..8495e953d409 100644
--- a/test/e2e/snaps/test-snap-cronjob.spec.js
+++ b/test/e2e/snaps/test-snap-cronjob.spec.js
@@ -31,10 +31,10 @@ describe('Test Snap Cronjob', function () {
// navigate to test snaps page and connect
await driver.openNewPage(TEST_SNAPS_WEBSITE_URL);
await driver.delay(1000);
- const snapButton = await driver.findElement('#connectCronjobSnap');
+ const snapButton = await driver.findElement('#connectcronjobs');
await driver.scrollToElement(snapButton);
await driver.delay(1000);
- await driver.clickElement('#connectCronjobSnap');
+ await driver.clickElement('#connectcronjobs');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -71,8 +71,8 @@ describe('Test Snap Cronjob', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectCronjobSnap',
- text: 'Reconnect to Cronjob Snap',
+ css: '#connectcronjobs',
+ text: 'Reconnect to Cronjobs Snap',
});
// switch to dialog popup, wait for a maximum of 65 seconds
@@ -86,7 +86,10 @@ describe('Test Snap Cronjob', function () {
// look for the dialog popup to verify cronjob fired
const error = await driver.findElement('.snap-delineator__content');
const text = await error.getText();
- assert.equal(text.includes(`Cronjob\nfired`), true);
+ assert.equal(
+ text.includes(`Cronjob\nThis dialog was triggered by a cronjob.`),
+ true,
+ );
// try to click on the Ok button and pass test if it works
await driver.clickElement({
diff --git a/test/e2e/snaps/test-snap-dialog.spec.js b/test/e2e/snaps/test-snap-dialog.spec.js
index 28825c0e2f22..e675a9910019 100644
--- a/test/e2e/snaps/test-snap-dialog.spec.js
+++ b/test/e2e/snaps/test-snap-dialog.spec.js
@@ -31,10 +31,10 @@ describe('Test Snap Dialog', function () {
// navigate to test snaps page and connect to dialog snap
await driver.openNewPage(TEST_SNAPS_WEBSITE_URL);
await driver.delay(1000);
- const dialogButton = await driver.findElement('#connectDialogSnap');
+ const dialogButton = await driver.findElement('#connectdialogs');
await driver.scrollToElement(dialogButton);
await driver.delay(1000);
- await driver.clickElement('#connectDialogSnap');
+ await driver.clickElement('#connectdialogs');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -71,8 +71,8 @@ describe('Test Snap Dialog', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectDialogSnap',
- text: 'Reconnect to Dialog Snap',
+ css: '#connectdialogs',
+ text: 'Reconnect to Dialogs Snap',
});
// click on alert dialog
@@ -91,7 +91,10 @@ describe('Test Snap Dialog', function () {
let result = await driver.findElement('.snap-ui-renderer__panel');
await driver.scrollToElement(result);
await driver.delay(500);
- assert.equal(await result.getText(), 'Alert Dialog\nText here');
+ assert.equal(
+ await result.getText(),
+ 'Alert Dialog\nThis is an alert dialog. It has a single button: "OK".',
+ );
// click ok button
await driver.clickElement({
@@ -109,7 +112,7 @@ describe('Test Snap Dialog', function () {
assert.equal(await result.getText(), 'null');
// click conf button
- await driver.clickElement('#sendConfButton');
+ await driver.clickElement('#sendConfirmationButton');
await driver.delay(500);
// switch to dialog popup
@@ -136,7 +139,7 @@ describe('Test Snap Dialog', function () {
assert.equal(await result.getText(), 'false');
// click conf button again
- await driver.clickElement('#sendConfButton');
+ await driver.clickElement('#sendConfirmationButton');
await driver.delay(500);
// switch to dialog popup
diff --git a/test/e2e/snaps/test-snap-error.spec.js b/test/e2e/snaps/test-snap-error.spec.js
index c8e17efdce0f..9c19cd7234ec 100644
--- a/test/e2e/snaps/test-snap-error.spec.js
+++ b/test/e2e/snaps/test-snap-error.spec.js
@@ -31,10 +31,10 @@ describe('Test Snap Error', function () {
// navigate to test snaps page and connect
await driver.openNewPage(TEST_SNAPS_WEBSITE_URL);
await driver.delay(1000);
- const snapButton = await driver.findElement('#connectErrorSnap');
+ const snapButton = await driver.findElement('#connecterrors');
await driver.scrollToElement(snapButton);
await driver.delay(1000);
- await driver.clickElement('#connectErrorSnap');
+ await driver.clickElement('#connecterrors');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -72,8 +72,8 @@ describe('Test Snap Error', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectErrorSnap',
- text: 'Reconnect to Error Snap',
+ css: '#connecterrors',
+ text: 'Reconnect to Errors Snap',
});
// find and click on send error
@@ -90,7 +90,7 @@ describe('Test Snap Error', function () {
const text = await error.getText();
assert.equal(
text.includes(
- "Snap Error: 'random error inside'. Error Code: '-32603'",
+ "Snap Error: 'Random error inside a promise.'. Error Code: '-32603'",
),
true,
);
diff --git a/test/e2e/snaps/test-snap-ethprovider.spec.js b/test/e2e/snaps/test-snap-ethprovider.spec.js
index 694c25aeffca..0baa9e805460 100644
--- a/test/e2e/snaps/test-snap-ethprovider.spec.js
+++ b/test/e2e/snaps/test-snap-ethprovider.spec.js
@@ -30,10 +30,12 @@ describe('Test Snap ethereum_provider', function () {
// navigate to test snaps page and connect
await driver.driver.get(TEST_SNAPS_WEBSITE_URL);
await driver.delay(1000);
- const snapButton = await driver.findElement('#connectEthproviderSnap');
+ const snapButton = await driver.findElement(
+ '#connectethereum-provider',
+ );
await driver.scrollToElement(snapButton);
await driver.delay(1000);
- await driver.clickElement('#connectEthproviderSnap');
+ await driver.clickElement('#connectethereum-provider');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -65,16 +67,16 @@ describe('Test Snap ethereum_provider', function () {
tag: 'button',
});
- // click send inputs on test snap page
+ // switch to test snap page
await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectEthproviderSnap',
- text: 'Reconnect to ethereum-provider Snap',
+ css: '#connectethereum-provider',
+ text: 'Reconnect to Ethereum Provider Snap',
});
- // find and click on send test
+ // find and click on send get version
const snapButton2 = await driver.findElement('#sendEthprovider');
await driver.scrollToElement(snapButton2);
await driver.delay(500);
@@ -83,7 +85,44 @@ describe('Test Snap ethereum_provider', function () {
// check the results of the message signature using waitForSelector
await driver.waitForSelector({
css: '#ethproviderResult',
- text: 'true',
+ text: '"1337"',
+ });
+
+ // find and click on send get version
+ const snapButton3 = await driver.findElement(
+ '#sendEthproviderAccounts',
+ );
+ await driver.scrollToElement(snapButton3);
+ await driver.delay(500);
+ await driver.clickElement('#sendEthproviderAccounts');
+
+ // switch to metamask window and click through confirmations
+ const windowHandles2 = await driver.waitUntilXWindowHandles(
+ 2,
+ 1000,
+ 10000,
+ );
+ await driver.switchToWindowWithTitle(
+ 'MetaMask Notification',
+ windowHandles2,
+ );
+ await driver.clickElement({
+ text: 'Next',
+ tag: 'button',
+ });
+ await driver.delay(500);
+ await driver.clickElement({
+ text: 'Connect',
+ tag: 'button',
+ });
+
+ // switch to test snap page
+ await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
+
+ // check the results of the message signature using waitForSelector
+ await driver.waitForSelector({
+ css: '#ethproviderResult',
+ text: '"0x5cfe73b6021e818b776b421b1c4db2474086a7e1"',
});
},
);
diff --git a/test/e2e/snaps/test-snap-getentropy.spec.js b/test/e2e/snaps/test-snap-getentropy.spec.js
index 8b5586d24d1b..de6ecc4dcf80 100644
--- a/test/e2e/snaps/test-snap-getentropy.spec.js
+++ b/test/e2e/snaps/test-snap-getentropy.spec.js
@@ -53,6 +53,8 @@ describe('Test Snap getEntropy', function () {
await driver.waitForSelector({ text: 'Install' });
+ await driver.clickElementSafe('[data-testid="snap-install-scroll"]');
+
await driver.clickElement({
text: 'Install',
tag: 'button',
@@ -71,7 +73,7 @@ describe('Test Snap getEntropy', function () {
// wait for npm installation success
await driver.waitForSelector({
css: '#connectGetEntropySnap',
- text: 'Reconnect to getEntropy Snap',
+ text: 'Reconnect to Get Entropy Snap',
});
// find and click on send test
@@ -100,7 +102,7 @@ describe('Test Snap getEntropy', function () {
// check the results of the message signature using waitForSelector
await driver.waitForSelector({
css: '#entropySignResult',
- text: '"0xb9c20d675976e12c8bb53c3fd8fdff2dee11ad2b132eb453b5a8f35b0553c52d3bcac0fd3324d22ff0c53b3445ef48c119ba6435bc9bfb03234806719599aa6f6245593238c734bcf9d94d2873cacdd65a3176be3ae7e5b84f95fdd4487a395f"',
+ text: '"0x9341785782b512c86235612365f1076b16731ed9473beb4d0804c30b7fcc3a055aa7103b02dc64014d923220712dfbef023ddcf6327b313ea2dfd4d83dc5a53e1c5e7f4e10bce49830eded302294054df8a7a46e5b6cb3e50eec564ecba17941"',
});
},
);
diff --git a/test/e2e/snaps/test-snap-installed.spec.js b/test/e2e/snaps/test-snap-installed.spec.js
index 71614a6f040b..f3ee0ba6e937 100644
--- a/test/e2e/snaps/test-snap-installed.spec.js
+++ b/test/e2e/snaps/test-snap-installed.spec.js
@@ -30,10 +30,10 @@ describe('Test Snap Installed', function () {
// navigate to test snaps page and connect
await driver.openNewPage(TEST_SNAPS_WEBSITE_URL);
await driver.delay(1000);
- const confirmButton = await driver.findElement('#connectDialogSnap');
+ const confirmButton = await driver.findElement('#connectdialogs');
await driver.scrollToElement(confirmButton);
await driver.delay(500);
- await driver.clickElement('#connectDialogSnap');
+ await driver.clickElement('#connectdialogs');
await driver.delay(500);
// switch to metamask extension and click connect
@@ -70,14 +70,14 @@ describe('Test Snap Installed', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectDialogSnap',
- text: 'Reconnect to Dialog Snap',
+ css: '#connectdialogs',
+ text: 'Reconnect to Dialogs Snap',
});
- const errorButton = await driver.findElement('#connectErrorSnap');
+ const errorButton = await driver.findElement('#connecterrors');
await driver.scrollToElement(errorButton);
await driver.delay(500);
- await driver.clickElement('#connectErrorSnap');
+ await driver.clickElement('#connecterrors');
// switch to metamask extension and click connect
windowHandles = await driver.waitUntilXWindowHandles(3, 1000, 10000);
@@ -109,7 +109,7 @@ describe('Test Snap Installed', function () {
// wait for npm installation success
await driver.waitForSelector({
css: '#installedSnapsResult',
- text: 'npm:@metamask/test-snap-dialog, npm:@metamask/test-snap-error',
+ text: 'npm:@metamask/dialog-example-snap, npm:@metamask/error-example-snap',
});
},
);
diff --git a/test/e2e/snaps/test-snap-lifecycle.spec.js b/test/e2e/snaps/test-snap-lifecycle.spec.js
new file mode 100644
index 000000000000..4da6c1e941d8
--- /dev/null
+++ b/test/e2e/snaps/test-snap-lifecycle.spec.js
@@ -0,0 +1,97 @@
+const { strict: assert } = require('assert');
+const { withFixtures } = require('../helpers');
+const FixtureBuilder = require('../fixture-builder');
+const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
+
+describe('Test Snap Lifecycle Hooks', function () {
+ it('can run lifecycle hook on connect', async function () {
+ const ganacheOptions = {
+ accounts: [
+ {
+ secretKey:
+ '0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC',
+ balance: 25000000000000000000,
+ },
+ ],
+ };
+ await withFixtures(
+ {
+ fixtures: new FixtureBuilder().build(),
+ ganacheOptions,
+ failOnConsoleError: false,
+ title: this.test.title,
+ },
+ async ({ driver }) => {
+ await driver.navigate();
+
+ // enter pw into extension
+ await driver.fill('#password', 'correct horse battery staple');
+ await driver.press('#password', driver.Key.ENTER);
+
+ // navigate to test snaps page and connect
+ await driver.openNewPage(TEST_SNAPS_WEBSITE_URL);
+ await driver.delay(1000);
+ const snapButton = await driver.findElement('#connectlifecycle-hooks');
+ await driver.scrollToElement(snapButton);
+ await driver.delay(1000);
+ await driver.clickElement('#connectlifecycle-hooks');
+ await driver.delay(1000);
+
+ // switch to metamask extension and click connect
+ let windowHandles = await driver.waitUntilXWindowHandles(
+ 3,
+ 1000,
+ 10000,
+ );
+ await driver.switchToWindowWithTitle(
+ 'MetaMask Notification',
+ windowHandles,
+ );
+ await driver.clickElement({
+ text: 'Connect',
+ tag: 'button',
+ });
+
+ await driver.waitForSelector({ text: 'Install' });
+
+ await driver.clickElement({
+ text: 'Install',
+ tag: 'button',
+ });
+
+ await driver.waitForSelector({ text: 'OK' });
+
+ await driver.clickElement({
+ text: 'OK',
+ tag: 'button',
+ });
+
+ // click send inputs on test snap page
+ await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
+
+ // wait for npm installation success
+ await driver.waitForSelector({
+ css: '#connectlifecycle-hooks',
+ text: 'Reconnect to Lifecycle Hooks Snap',
+ });
+
+ // switch to dialog popup
+ windowHandles = await driver.waitUntilXWindowHandles(3, 1000, 10000);
+ await driver.switchToWindowWithTitle(
+ 'MetaMask Notification',
+ windowHandles,
+ );
+ await driver.delay(500);
+
+ // check dialog contents
+ const result = await driver.findElement('.snap-ui-renderer__panel');
+ await driver.scrollToElement(result);
+ await driver.delay(500);
+ assert.equal(
+ await result.getText(),
+ 'Installation successful\nThe snap was installed successfully, and the "onInstall" handler was called.',
+ );
+ },
+ );
+ });
+});
diff --git a/test/e2e/snaps/test-snap-manageAccount.spec.js b/test/e2e/snaps/test-snap-manageAccount.spec.js
index 9ba5dce54ca5..44ca13dbc3f6 100644
--- a/test/e2e/snaps/test-snap-manageAccount.spec.js
+++ b/test/e2e/snaps/test-snap-manageAccount.spec.js
@@ -52,11 +52,7 @@ describe('Test Snap Account', function () {
tag: 'button',
});
- try {
- await driver.clickElement('[data-testid="snap-install-scroll"]');
- } catch (_) {
- console.log('Missing scroll');
- }
+ await driver.clickElementSafe('[data-testid="snap-install-scroll"]');
await driver.waitForSelector({ text: 'Install' });
diff --git a/test/e2e/snaps/test-snap-management.spec.js b/test/e2e/snaps/test-snap-management.spec.js
index df520d30ac74..6af006bd9ab1 100644
--- a/test/e2e/snaps/test-snap-management.spec.js
+++ b/test/e2e/snaps/test-snap-management.spec.js
@@ -33,10 +33,10 @@ describe('Test Snap Management', function () {
await driver.delay(1000);
// find and scroll to the correct card and click first
- const snapButton = await driver.findElement('#connectNotification');
+ const snapButton = await driver.findElement('#connectnotifications');
await driver.scrollToElement(snapButton);
await driver.delay(1000);
- await driver.clickElement('#connectNotification');
+ await driver.clickElement('#connectnotifications');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -91,7 +91,7 @@ describe('Test Snap Management', function () {
// try to disable the snap
await driver.clickElement({
- text: 'Notification Test Snap',
+ text: 'Notifications Example Snap',
tag: 'p',
});
await driver.clickElement('.toggle-button > div');
@@ -138,7 +138,7 @@ describe('Test Snap Management', function () {
// try to remove snap
await driver.clickElement({
- text: 'Remove Notification Test Snap',
+ text: 'Remove Notifications Example Snap',
tag: 'p',
});
await driver.delay(1000);
diff --git a/test/e2e/snaps/test-snap-managestate.spec.js b/test/e2e/snaps/test-snap-managestate.spec.js
index 5bcc9bcbb037..dbd4f0891153 100644
--- a/test/e2e/snaps/test-snap-managestate.spec.js
+++ b/test/e2e/snaps/test-snap-managestate.spec.js
@@ -34,10 +34,10 @@ describe('Test Snap manageState', function () {
await driver.delay(1000);
// find and scroll to the connect button and click it
- const snapButton1 = await driver.findElement('#connectManageState');
+ const snapButton1 = await driver.findElement('#connectmanage-state');
await driver.scrollToElement(snapButton1);
await driver.delay(1000);
- await driver.clickElement('#connectManageState');
+ await driver.clickElement('#connectmanage-state');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -74,7 +74,7 @@ describe('Test Snap manageState', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectManageState',
+ css: '#connectmanage-state',
text: 'Reconnect to Manage State Snap',
});
@@ -101,7 +101,7 @@ describe('Test Snap manageState', function () {
);
assert.equal(
await retrieveManageStateResult.getText(),
- '{ "testState": [ "23" ] }',
+ '{ "items": [ "23" ] }',
);
// click clear results
@@ -121,7 +121,7 @@ describe('Test Snap manageState', function () {
);
assert.equal(
await retrieveManageStateResult2.getText(),
- '{ "testState": [] }',
+ '{ "items": [] }',
);
},
);
diff --git a/test/e2e/snaps/test-snap-networkaccess.spec.js b/test/e2e/snaps/test-snap-networkaccess.spec.js
index e80012a55012..0a65386804fc 100644
--- a/test/e2e/snaps/test-snap-networkaccess.spec.js
+++ b/test/e2e/snaps/test-snap-networkaccess.spec.js
@@ -1,4 +1,3 @@
-const { strict: assert } = require('assert');
const { withFixtures } = require('../helpers');
const FixtureBuilder = require('../fixture-builder');
const { TEST_SNAPS_WEBSITE_URL } = require('./enums');
@@ -31,16 +30,14 @@ describe('Test Snap networkAccess', function () {
// navigate to test snaps page and connect to dialog snap
await driver.openNewPage(TEST_SNAPS_WEBSITE_URL);
await driver.delay(1000);
- const dialogButton = await driver.findElement(
- '#connectNetworkAccessSnap',
- );
+ const dialogButton = await driver.findElement('#connectnetwork-access');
await driver.scrollToElement(dialogButton);
await driver.delay(1000);
- await driver.clickElement('#connectNetworkAccessSnap');
+ await driver.clickElement('#connectnetwork-access');
await driver.delay(1000);
// switch to metamask extension and click connect
- let windowHandles = await driver.waitUntilXWindowHandles(
+ const windowHandles = await driver.waitUntilXWindowHandles(
3,
1000,
10000,
@@ -73,32 +70,18 @@ describe('Test Snap networkAccess', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectNetworkAccessSnap',
- text: 'Reconnect to networkAccess Snap',
+ css: '#connectnetwork-access',
+ text: 'Reconnect to Network Access Snap',
});
// click on alert dialog
await driver.clickElement('#sendNetworkAccessTest');
await driver.delay(500);
- // switch to dialog popup
- windowHandles = await driver.waitUntilXWindowHandles(3, 1000, 10000);
- await driver.switchToWindowWithTitle(
- 'MetaMask Notification',
- windowHandles,
- );
- await driver.delay(500);
-
- // check dialog contents
- const result = await driver.findElement('.snap-ui-renderer__panel');
- await driver.scrollToElement(result);
- await driver.delay(500);
- assert.equal(await result.getText(), 'FETCHED_SUCCESSFULLY');
-
- // click ok button
- await driver.clickElement({
- text: 'OK',
- tag: 'button',
+ // check for result correctness
+ await driver.waitForSelector({
+ css: '#networkAccessResult',
+ text: '"hello": "world"',
});
},
);
diff --git a/test/e2e/snaps/test-snap-notification.spec.js b/test/e2e/snaps/test-snap-notification.spec.js
index d53fe06b9c30..fd272ea2ca16 100644
--- a/test/e2e/snaps/test-snap-notification.spec.js
+++ b/test/e2e/snaps/test-snap-notification.spec.js
@@ -33,10 +33,10 @@ describe('Test Snap Notification', function () {
await driver.delay(1000);
// find and scroll down to snapId5 and connect
- const snapButton = await driver.findElement('#connectNotification');
+ const snapButton = await driver.findElement('#connectnotifications');
await driver.scrollToElement(snapButton);
await driver.delay(1000);
- await driver.clickElement('#connectNotification');
+ await driver.clickElement('#connectnotifications');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -74,8 +74,8 @@ describe('Test Snap Notification', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectNotification',
- text: 'Reconnect to Notification Snap',
+ css: '#connectnotifications',
+ text: 'Reconnect to Notifications Snap',
});
await driver.clickElement('#sendInAppNotification');
@@ -102,8 +102,8 @@ describe('Test Snap Notification', function () {
// try to click on the notification item (via xpath)
await driver.clickElement({
- text: 'Notifications',
- tag: 'span',
+ text: 'Notifications 1',
+ css: '.menu-item',
});
await driver.delay(500);
@@ -113,7 +113,7 @@ describe('Test Snap Notification', function () {
);
assert.equal(
await notificationResultMessage.getText(),
- 'TEST INAPP NOTIFICATION',
+ 'Hello from within MetaMask!',
);
},
);
diff --git a/test/e2e/snaps/test-snap-rpc.spec.js b/test/e2e/snaps/test-snap-rpc.spec.js
index 5fe574490592..2c955e9e7d6e 100644
--- a/test/e2e/snaps/test-snap-rpc.spec.js
+++ b/test/e2e/snaps/test-snap-rpc.spec.js
@@ -32,10 +32,10 @@ describe('Test Snap RPC', function () {
await driver.delay(1000);
// find and scroll to the bip32 test and connect
- const snapButton1 = await driver.findElement('#connectBip32');
+ const snapButton1 = await driver.findElement('#connectbip32');
await driver.scrollToElement(snapButton1);
await driver.delay(1000);
- await driver.clickElement('#connectBip32');
+ await driver.clickElement('#connectbip32');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -84,10 +84,10 @@ describe('Test Snap RPC', function () {
// switch back to test-snaps window
await driver.switchToWindowWithTitle('Test Snaps', windowHandles);
- const snapButton2 = await driver.findElement('#connectRpcSnap');
+ const snapButton2 = await driver.findElement('#connectjson-rpc');
await driver.scrollToElement(snapButton2);
await driver.delay(1000);
- await driver.clickElement('#connectRpcSnap');
+ await driver.clickElement('#connectjson-rpc');
await driver.delay(1000);
windowHandles = await driver.waitUntilXWindowHandles(2, 1000, 10000);
@@ -118,8 +118,8 @@ describe('Test Snap RPC', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectRpcSnap',
- text: 'Reconnect to RPC Snap',
+ css: '#connectjson-rpc',
+ text: 'Reconnect to JSON-RPC Snap',
});
// click send inputs on test snap page
diff --git a/test/e2e/snaps/test-snap-txinsights.spec.js b/test/e2e/snaps/test-snap-txinsights.spec.js
index cb8bfc3b1192..637dab89e2e2 100644
--- a/test/e2e/snaps/test-snap-txinsights.spec.js
+++ b/test/e2e/snaps/test-snap-txinsights.spec.js
@@ -32,10 +32,12 @@ describe('Test Snap TxInsights', function () {
await driver.delay(1000);
// find and scroll to the bip32 test and connect
- const snapButton1 = await driver.findElement('#connectInsightsSnap');
+ const snapButton1 = await driver.findElement(
+ '#connecttransaction-insights',
+ );
await driver.scrollToElement(snapButton1);
await driver.delay(1000);
- await driver.clickElement('#connectInsightsSnap');
+ await driver.clickElement('#connecttransaction-insights');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -102,7 +104,7 @@ describe('Test Snap TxInsights', function () {
);
await driver.delay(1000);
await driver.clickElement({
- text: 'TxInsightsTest',
+ text: 'Insights Example Snap',
tag: 'button',
});
@@ -111,7 +113,10 @@ describe('Test Snap TxInsights', function () {
const txInsightsResult = await driver.findElement(
'.snap-ui-renderer__content',
);
- assert.equal(await txInsightsResult.getText(), 'Test: Successful');
+ assert.equal(
+ await txInsightsResult.getText(),
+ 'Transaction type:\nERC-20',
+ );
},
);
});
diff --git a/test/e2e/snaps/test-snap-update.spec.js b/test/e2e/snaps/test-snap-update.spec.js
index 485c87b669f7..ea8dcbc11962 100644
--- a/test/e2e/snaps/test-snap-update.spec.js
+++ b/test/e2e/snaps/test-snap-update.spec.js
@@ -127,7 +127,7 @@ describe('Test Snap update', function () {
// look for the correct version text
await driver.waitForSelector({
css: '#updateSnapVersion',
- text: '"5.1.2"',
+ text: '"0.35.2-flask.1"',
});
},
);
diff --git a/test/e2e/snaps/test-snap-wasm.spec.js b/test/e2e/snaps/test-snap-wasm.spec.js
index 1af49492f252..f0e301ca53e5 100644
--- a/test/e2e/snaps/test-snap-wasm.spec.js
+++ b/test/e2e/snaps/test-snap-wasm.spec.js
@@ -30,10 +30,10 @@ describe('Test Snap WASM', function () {
// navigate to test snaps page and connect
await driver.openNewPage(TEST_SNAPS_WEBSITE_URL);
await driver.delay(1000);
- const snapButton = await driver.findElement('#connectWasmSnap');
+ const snapButton = await driver.findElement('#connectwasm');
await driver.scrollToElement(snapButton);
await driver.delay(1000);
- await driver.clickElement('#connectWasmSnap');
+ await driver.clickElement('#connectwasm');
await driver.delay(1000);
// switch to metamask extension and click connect
@@ -71,7 +71,7 @@ describe('Test Snap WASM', function () {
// wait for npm installation success
await driver.waitForSelector({
- css: '#connectWasmSnap',
+ css: '#connectwasm',
text: 'Reconnect to WebAssembly Snap',
});
diff --git a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json
index 8edcbc64624c..d4e531e656cd 100644
--- a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json
+++ b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-background-state.json
@@ -43,6 +43,7 @@
},
"BackupController": "undefined",
"CachedBalancesController": { "cachedBalances": "object" },
+ "CronjobController": { "jobs": "object" },
"CurrencyController": {
"conversionDate": "number",
"conversionRate": 1700,
@@ -111,6 +112,7 @@
"allNfts": "object",
"ignoredNfts": "object"
},
+ "NotificationController": { "notifications": "object" },
"OnboardingController": {
"seedPhraseBackedUp": true,
"firstTimeFlowType": "import",
@@ -170,6 +172,12 @@
"smartTransactions": "object"
}
},
+ "SnapController": {
+ "snapErrors": "object",
+ "snaps": "object",
+ "snapStates": "object"
+ },
+ "SnapsRegistry": { "database": "object", "lastUpdated": "object" },
"SubjectMetadataController": { "subjectMetadata": "object" },
"SwapsController": {
"swapsState": {
diff --git a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json
index 546004f9f3cc..70726e17b1ab 100644
--- a/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json
+++ b/test/e2e/tests/state-snapshots/errors-after-init-opt-in-ui-state.json
@@ -146,6 +146,13 @@
"allNftContracts": "object",
"allNfts": "object",
"ignoredNfts": "object",
+ "snapErrors": "object",
+ "snaps": "object",
+ "snapStates": "object",
+ "jobs": "object",
+ "database": "object",
+ "lastUpdated": "object",
+ "notifications": "object",
"accounts": "object",
"currentNetworkTxList": "object",
"unapprovedDecryptMsgs": "object",
diff --git a/test/e2e/webdriver/driver.js b/test/e2e/webdriver/driver.js
index f3e4ccb1f168..d6592c44fec6 100644
--- a/test/e2e/webdriver/driver.js
+++ b/test/e2e/webdriver/driver.js
@@ -249,6 +249,18 @@ class Driver {
await element.click();
}
+ async clickElementSafe(rawLocator) {
+ // for instances where an element such as a scroll button does not
+ // show up because of render differences, proceed to the next step
+ // without causing a test failure, but provide a console log of why.
+ try {
+ const element = await this.findClickableElement(rawLocator);
+ await element.click();
+ } catch (e) {
+ console.log(`Element ${rawLocator} not found (${e})`);
+ }
+ }
+
async clickPoint(rawLocator, x, y) {
const element = await this.findElement(rawLocator);
await this.driver
diff --git a/test/env.js b/test/env.js
index dd3c370b88da..b451e2a8090e 100644
--- a/test/env.js
+++ b/test/env.js
@@ -1,4 +1,4 @@
process.env.METAMASK_ENVIRONMENT = 'test';
process.env.SUPPORT_LINK = 'https://support.metamask.io';
process.env.IFRAME_EXECUTION_ENVIRONMENT_URL =
- 'https://execution.metamask.io/0.36.1-flask.1/index.html';
+ 'https://execution.consensys.io/0.36.1-flask.1/index.html';
diff --git a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js
index c4d907462a75..456501e8112b 100644
--- a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js
+++ b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js
@@ -111,7 +111,7 @@ export default class ConfirmPageContainerContent extends Component {
} = this.props;
return (
-
+
-
+ {
+ // Use legacy authorship header for snaps
+ ///: BEGIN:ONLY_INCLUDE_IN(snaps)
+ targetSubjectMetadata?.subjectType === SubjectType.Snap ? (
+
+ ) : (
+ ///: END:ONLY_INCLUDE_IN
+
+ ///: BEGIN:ONLY_INCLUDE_IN(snaps)
+ )
+ ///: END:ONLY_INCLUDE_IN
+ }
{
+ const packageName = snapId && removeSnapIdPrefix(snapId);
+
+ const subjectMetadata = useSelector((state) =>
+ getTargetSubjectMetadata(state, snapId),
+ );
+
+ const friendlyName = snapId && getSnapName(snapId, subjectMetadata);
+
+ return (
+
+
+
+
+
+
+ {friendlyName}
+
+
+ {packageName}
+
+
+
+ );
+};
+
+SnapLegacyAuthorshipHeader.propTypes = {
+ /**
+ * The id of the snap
+ */
+ snapId: PropTypes.string,
+ /**
+ * The className of the SnapLegacyAuthorshipHeader
+ */
+ className: PropTypes.string,
+ marginLeft: PropTypes.number,
+ marginRight: PropTypes.number,
+};
+
+export default SnapLegacyAuthorshipHeader;
diff --git a/ui/components/app/snaps/snap-legacy-authorship-header/snap-legacy-authorship-header.stories.js b/ui/components/app/snaps/snap-legacy-authorship-header/snap-legacy-authorship-header.stories.js
new file mode 100644
index 000000000000..6e71f4ee61d5
--- /dev/null
+++ b/ui/components/app/snaps/snap-legacy-authorship-header/snap-legacy-authorship-header.stories.js
@@ -0,0 +1,21 @@
+import React from 'react';
+import SnapLegacyAuthorshipHeader from './snap-legacy-authorship-header';
+
+export default {
+ title: 'Components/App/Snaps/SnapLegacyAuthorshipHeader',
+
+ component: SnapLegacyAuthorshipHeader,
+ argTypes: {
+ snapId: {
+ control: 'text',
+ },
+ },
+};
+
+export const DefaultStory = (args) => ;
+
+DefaultStory.storyName = 'Default';
+
+DefaultStory.args = {
+ snapId: 'npm:@metamask/test-snap-bip44',
+};
diff --git a/ui/components/app/snaps/snap-privacy-warning/snap-privacy-warning.test.js b/ui/components/app/snaps/snap-privacy-warning/snap-privacy-warning.test.js
index 35f426b50d65..84b29298b95b 100644
--- a/ui/components/app/snaps/snap-privacy-warning/snap-privacy-warning.test.js
+++ b/ui/components/app/snaps/snap-privacy-warning/snap-privacy-warning.test.js
@@ -21,7 +21,7 @@ describe('Snap Privacy Warning Popover', () => {
).toBeInTheDocument();
expect(
screen.getByText(
- 'Consensys has no access to information you share with these third parties.',
+ 'Consensys has no access to information you share with Third Party Services.',
),
).toBeInTheDocument();
expect(
diff --git a/ui/components/app/snaps/snap-ui-markdown/snap-ui-markdown.js b/ui/components/app/snaps/snap-ui-markdown/snap-ui-markdown.js
index 359521152d7f..9d03f71938c3 100644
--- a/ui/components/app/snaps/snap-ui-markdown/snap-ui-markdown.js
+++ b/ui/components/app/snaps/snap-ui-markdown/snap-ui-markdown.js
@@ -16,7 +16,11 @@ const Paragraph = (props) => (
/>
);
-export const SnapUIMarkdown = ({ children }) => {
+export const SnapUIMarkdown = ({ children, markdown }) => {
+ if (markdown === false) {
+ return {children};
+ }
+
return (
{
SnapUIMarkdown.propTypes = {
children: PropTypes.string,
+ markdown: PropTypes.bool,
};
diff --git a/ui/components/app/snaps/snap-ui-renderer/snap-ui-renderer.js b/ui/components/app/snaps/snap-ui-renderer/snap-ui-renderer.js
index 60033d2d1ca6..0a7378686caa 100644
--- a/ui/components/app/snaps/snap-ui-renderer/snap-ui-renderer.js
+++ b/ui/components/app/snaps/snap-ui-renderer/snap-ui-renderer.js
@@ -46,6 +46,9 @@ export const UI_MAPPING = {
text: (props) => ({
element: 'SnapUIMarkdown',
children: props.value,
+ props: {
+ markdown: props.markdown,
+ },
}),
spinner: () => ({
element: 'Spinner',
diff --git a/ui/components/app/whats-new-popup/whats-new-popup.js b/ui/components/app/whats-new-popup/whats-new-popup.js
index 15ec13270165..8d1384fb0187 100644
--- a/ui/components/app/whats-new-popup/whats-new-popup.js
+++ b/ui/components/app/whats-new-popup/whats-new-popup.js
@@ -16,7 +16,10 @@ import {
} from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { updateViewedNotifications } from '../../../store/actions';
-import { getTranslatedUINotifications } from '../../../../shared/notifications';
+import {
+ NOTIFICATION_OPEN_BETA_SNAPS,
+ getTranslatedUINotifications,
+} from '../../../../shared/notifications';
import { getSortedAnnouncementsToShow } from '../../../selectors';
import {
BUILD_QUOTE_ROUTE,
@@ -106,6 +109,12 @@ function getActionFunctionById(id, history) {
24: () => {
updateViewedNotifications({ 24: true });
},
+ [NOTIFICATION_OPEN_BETA_SNAPS]: () => {
+ updateViewedNotifications({ [NOTIFICATION_OPEN_BETA_SNAPS]: true });
+ global.platform.openTab({
+ url: 'https://metamask.io/snaps/',
+ });
+ },
};
return actionFunctions[id];
@@ -368,6 +377,7 @@ export default function WhatsNewPopup({
21: renderFirstNotification,
22: renderFirstNotification,
24: renderFirstNotification,
+ [NOTIFICATION_OPEN_BETA_SNAPS]: renderFirstNotification,
};
return (
diff --git a/ui/components/multichain/global-menu/global-menu.js b/ui/components/multichain/global-menu/global-menu.js
index b70960227156..d3fe82043d5d 100644
--- a/ui/components/multichain/global-menu/global-menu.js
+++ b/ui/components/multichain/global-menu/global-menu.js
@@ -203,7 +203,7 @@ export const GlobalMenu = ({ closeMenu, anchorElement }) => {
history.push(NOTIFICATIONS_ROUTE);
}}
>
- {t('notifications')}
+ {t('notifications')}
{unreadNotificationsCount > 0 && (
({
+ label: t('permission_lifecycleHooks'),
+ description: t('permission_lifecycleHooksDescription'),
+ leftIcon: IconName.Hierarchy,
+ weight: 3,
+ }),
///: END:ONLY_INCLUDE_IN
///: BEGIN:ONLY_INCLUDE_IN(keyring-snaps)
[RestrictedMethods.snap_manageAccounts]: ({ t }) => ({
diff --git a/ui/pages/confirm-signature-request/index.js b/ui/pages/confirm-signature-request/index.js
index b86b23a6ee06..a36efc84d992 100644
--- a/ui/pages/confirm-signature-request/index.js
+++ b/ui/pages/confirm-signature-request/index.js
@@ -4,6 +4,7 @@ import { useDispatch, useSelector } from 'react-redux';
import { useHistory, withRouter } from 'react-router-dom';
import log from 'loglevel';
import { cloneDeep } from 'lodash';
+import { SubjectType } from '@metamask/permission-controller';
import * as actions from '../../store/actions';
import txHelper from '../../helpers/utils/tx-helper';
import SignatureRequest from '../../components/app/signature-request';
@@ -16,13 +17,14 @@ import {
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
getSelectedAccount,
///: END:ONLY_INCLUDE_IN
+ getTargetSubjectMetadata,
} from '../../selectors';
import { MESSAGE_TYPE } from '../../../shared/constants/app';
import { TransactionStatus } from '../../../shared/constants/transaction';
import { getSendTo } from '../../ducks/send';
import { getProviderConfig } from '../../ducks/metamask/metamask';
-const signatureSelect = (txData) => {
+const signatureSelect = (txData, targetSubjectMetadata) => {
const {
type,
msgParams: { version, siwe },
@@ -36,7 +38,7 @@ const signatureSelect = (txData) => {
return SignatureRequest;
}
- if (siwe?.isSIWEMessage) {
+ if (siwe?.isSIWEMessage && targetSubjectMetadata !== SubjectType.Snap) {
return SignatureRequestSIWE;
}
@@ -167,11 +169,16 @@ const ConfirmTxScreen = ({ match }) => {
const txData = getTxData() || {};
const { msgParams } = txData;
+
+ const targetSubjectMetadata = useSelector((state) =>
+ getTargetSubjectMetadata(state, msgParams?.origin),
+ );
+
if (!msgParams) {
return ;
}
- const SigComponent = signatureSelect(txData);
+ const SigComponent = signatureSelect(txData, targetSubjectMetadata);
return (
history.push(mostRecentOverviewPage)}
footerClassName="connected-accounts__footer"
footer={
- connectedAccounts.length ? (
+ permissions?.length > 0 && (
- ) : null
+ )
}
>
{
const { getByText, getByRole } = render(mockStore);
- expect(getByText('Nothing to see here.')).toBeDefined();
+ expect(
+ getByText(
+ 'This is where you can find notifications from your installed snaps.',
+ ),
+ ).toBeDefined();
expect(getByRole('button', { name: 'Mark all as read' })).toBeDisabled();
});
});
diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js
index e6ae9e425169..b647bfa8c03a 100644
--- a/ui/selectors/selectors.js
+++ b/ui/selectors/selectors.js
@@ -93,6 +93,7 @@ import {
hexToDecimal,
} from '../../shared/modules/conversion.utils';
import { BackgroundColor } from '../helpers/constants/design-system';
+import { NOTIFICATION_OPEN_BETA_SNAPS } from '../../shared/notifications';
///: BEGIN:ONLY_INCLUDE_IN(snaps)
import { SNAPS_VIEW_ROUTE } from '../helpers/constants/routes';
import { getPermissionSubjects } from './permissions';
@@ -1032,6 +1033,7 @@ function getAllowedAnnouncementIds(state) {
21: isSwapsChain,
22: true,
24: state.metamask.hadAdvancedGasFeesSetPriorToMigration92_3 === true,
+ [NOTIFICATION_OPEN_BETA_SNAPS]: true,
};
}
diff --git a/yarn.lock b/yarn.lock
index eb1a68cf50b7..5610f527b53a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4352,7 +4352,7 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/key-tree@npm:^7.0.0, @metamask/key-tree@npm:^7.1.1":
+"@metamask/key-tree@npm:^7.1.1":
version: 7.1.1
resolution: "@metamask/key-tree@npm:7.1.1"
dependencies:
@@ -4366,6 +4366,20 @@ __metadata:
languageName: node
linkType: hard
+"@metamask/key-tree@npm:^9.0.0":
+ version: 9.0.0
+ resolution: "@metamask/key-tree@npm:9.0.0"
+ dependencies:
+ "@metamask/scure-bip39": ^2.1.0
+ "@metamask/utils": ^6.0.1
+ "@noble/ed25519": ^1.6.0
+ "@noble/hashes": ^1.0.0
+ "@noble/secp256k1": ^1.5.5
+ "@scure/base": ^1.0.0
+ checksum: 5c81f07351ca59b37570d52edcc80d60424630b2a8403ed7149c3343c264878ac5d3fc0584a61635ea7ddda4a789295ded1247846606dc529d8e2fd42f6fc61a
+ languageName: node
+ linkType: hard
+
"@metamask/keyring-api@npm:^0.1.3":
version: 0.1.3
resolution: "@metamask/keyring-api@npm:0.1.3"
@@ -4669,20 +4683,20 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/rpc-methods-flask@npm:@metamask/rpc-methods@0.36.1-flask.1, @metamask/rpc-methods@npm:^0.36.1-flask.1":
- version: 0.36.1-flask.1
- resolution: "@metamask/rpc-methods@npm:0.36.1-flask.1"
+"@metamask/rpc-methods-flask@npm:@metamask/rpc-methods@0.37.2-flask.1, @metamask/rpc-methods@npm:^0.37.2-flask.1":
+ version: 0.37.2-flask.1
+ resolution: "@metamask/rpc-methods@npm:0.37.2-flask.1"
dependencies:
- "@metamask/key-tree": ^7.1.1
+ "@metamask/key-tree": ^9.0.0
"@metamask/permission-controller": ^4.0.0
- "@metamask/snaps-ui": ^0.36.1-flask.1
- "@metamask/snaps-utils": ^0.36.1-flask.1
+ "@metamask/snaps-ui": ^0.37.2-flask.1
+ "@metamask/snaps-utils": ^0.37.2-flask.1
"@metamask/types": ^1.1.0
"@metamask/utils": ^6.0.1
"@noble/hashes": ^1.3.1
eth-rpc-errors: ^4.0.3
superstruct: ^1.0.3
- checksum: 1172d2783285656478ba14fc9dbebfd7ad4150826f5eddd737a6cae376cf0e1d69e7b53570c9be45d95a14cc0533269ab4f2c8c4f28e3d867cfd06d68b5a2aac
+ checksum: f5b955c3a7b7c042c27aa5d9464ea5d9135104c20af3315ea00d8941c5c6379c12c82c0988bc5c21409f4dd8b740bb93b387e2ee115c914b434e28101cd9d877
languageName: node
linkType: hard
@@ -4704,22 +4718,22 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/rpc-methods@npm:^1.0.0-prerelease.1":
- version: 1.0.0-prerelease.1
- resolution: "@metamask/rpc-methods@npm:1.0.0-prerelease.1"
+"@metamask/rpc-methods@npm:^1.0.2":
+ version: 1.0.2
+ resolution: "@metamask/rpc-methods@npm:1.0.2"
dependencies:
"@metamask/browser-passworder": ^4.0.2
"@metamask/key-tree": ^7.1.1
"@metamask/permission-controller": ^4.0.0
- "@metamask/snaps-ui": ^1.0.0-prerelease.1
- "@metamask/snaps-utils": ^1.0.0-prerelease.1
+ "@metamask/snaps-ui": ^1.0.2
+ "@metamask/snaps-utils": ^1.0.2
"@metamask/types": ^1.1.0
"@metamask/utils": ^6.0.1
"@noble/hashes": ^1.1.3
eth-rpc-errors: ^4.0.2
nanoid: ^3.1.31
superstruct: ^1.0.3
- checksum: 6c97446d41d77c11182a065d39e4030781fbbb67d941b2f85c739784f9ddef601fec1485567fa18d505ea8e50c825cbd6ccddafd5bc9939f2b8922d7009cf321
+ checksum: b5de7ea63726cf3dc2324e8bc462d95de67bbf15f34849a2fdcb321efa21f255644b83e79ae1b1305a5b4ac0d7fb8fd110b917d08541326ba3d4dab3dbc1e594
languageName: node
linkType: hard
@@ -4811,19 +4825,19 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-controllers-flask@npm:@metamask/snaps-controllers@0.36.1-flask.1":
- version: 0.36.1-flask.1
- resolution: "@metamask/snaps-controllers@npm:0.36.1-flask.1"
+"@metamask/snaps-controllers-flask@npm:@metamask/snaps-controllers@0.38.0-flask.1":
+ version: 0.38.0-flask.1
+ resolution: "@metamask/snaps-controllers@npm:0.38.0-flask.1"
dependencies:
"@metamask/approval-controller": ^3.0.0
"@metamask/base-controller": ^3.0.0
"@metamask/object-multiplex": ^1.2.0
"@metamask/permission-controller": ^4.0.0
"@metamask/post-message-stream": ^6.1.2
- "@metamask/rpc-methods": ^0.36.1-flask.1
- "@metamask/snaps-execution-environments": ^0.36.1-flask.1
+ "@metamask/rpc-methods": ^0.37.2-flask.1
+ "@metamask/snaps-execution-environments": ^0.38.0-flask.1
"@metamask/snaps-registry": ^1.2.1
- "@metamask/snaps-utils": ^0.36.1-flask.1
+ "@metamask/snaps-utils": ^0.38.0-flask.1
"@metamask/utils": ^6.0.1
"@xstate/fsm": ^2.0.0
concat-stream: ^2.0.0
@@ -4837,7 +4851,7 @@ __metadata:
pump: ^3.0.0
readable-web-to-node-stream: ^3.0.2
tar-stream: ^2.2.0
- checksum: 9e7f9fa7a5989d4afda7cb6c8c7071059c2b48a2f3c6548eba0aca4ccf0103c3aa59167b1a31f905b9e8cbf79f41b9344945dd35719934083a18a85225985766
+ checksum: 538d2fc5295f094d5852c8385b99c60daf3874628f6627926b10412a309d86a7ee3e5bcb61f8c3fdd40b403d6ea08795aa2d338271924c36c6204d65adfcacd6
languageName: node
linkType: hard
@@ -4871,19 +4885,19 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-controllers@npm:^1.0.0-prerelease.1":
- version: 1.0.0-prerelease.1
- resolution: "@metamask/snaps-controllers@npm:1.0.0-prerelease.1"
+"@metamask/snaps-controllers@npm:^1.0.2":
+ version: 1.0.2
+ resolution: "@metamask/snaps-controllers@npm:1.0.2"
dependencies:
"@metamask/approval-controller": ^3.0.0
"@metamask/base-controller": ^3.0.0
"@metamask/object-multiplex": ^1.2.0
"@metamask/permission-controller": ^4.0.0
"@metamask/post-message-stream": ^6.1.2
- "@metamask/rpc-methods": ^1.0.0-prerelease.1
- "@metamask/snaps-execution-environments": ^1.0.0-prerelease.1
+ "@metamask/rpc-methods": ^1.0.2
+ "@metamask/snaps-execution-environments": ^1.0.2
"@metamask/snaps-registry": ^1.2.1
- "@metamask/snaps-utils": ^1.0.0-prerelease.1
+ "@metamask/snaps-utils": ^1.0.2
"@metamask/utils": ^6.0.1
"@xstate/fsm": ^2.0.0
concat-stream: ^2.0.0
@@ -4897,7 +4911,7 @@ __metadata:
pump: ^3.0.0
readable-web-to-node-stream: ^3.0.2
tar-stream: ^2.2.0
- checksum: 695fd90ad0f8bf2befd813e4ca8568b496575d581e94cac608a6daea55be57f508c5615d05e974d2de459a74cd6f84fb5ab7eb763e56e50b28484989e3e04ca6
+ checksum: 3a85ab7379f8034909efe53be6afb17d0f6804fc6628a63e22117e504aea2a42d1036a96432efd13bd6987e289b9e623e682306e5bd30ee2e207cb531cc627e9
languageName: node
linkType: hard
@@ -4922,15 +4936,15 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-execution-environments@npm:^0.36.1-flask.1":
- version: 0.36.1-flask.1
- resolution: "@metamask/snaps-execution-environments@npm:0.36.1-flask.1"
+"@metamask/snaps-execution-environments@npm:^0.38.0-flask.1":
+ version: 0.38.0-flask.1
+ resolution: "@metamask/snaps-execution-environments@npm:0.38.0-flask.1"
dependencies:
"@metamask/object-multiplex": ^1.2.0
"@metamask/post-message-stream": ^6.1.2
"@metamask/providers": ^11.0.0
- "@metamask/rpc-methods": ^0.36.1-flask.1
- "@metamask/snaps-utils": ^0.36.1-flask.1
+ "@metamask/rpc-methods": ^0.37.2-flask.1
+ "@metamask/snaps-utils": ^0.38.0-flask.1
"@metamask/utils": ^6.0.1
eth-rpc-errors: ^4.0.3
json-rpc-engine: ^6.1.0
@@ -4939,19 +4953,19 @@ __metadata:
ses: ^0.18.1
stream-browserify: ^3.0.0
superstruct: ^1.0.3
- checksum: 1863a37df13f8c0684a5b5d281e53294869a75daa4c4b8429593aee29bff6bf4aad4365eee19a1a1e20cfa47557dc12c4e266dae74c5ab0e951a6917cf9af6e6
+ checksum: 725163d03c3c17d0a67ad5829adf69da8bcd2d3890efd984ff5954a19aeeeb4e024a96810d9ae9d5f095f1e39965376f62d41637ff61c59519f46c093f05b0f9
languageName: node
linkType: hard
-"@metamask/snaps-execution-environments@npm:^1.0.0-prerelease.1":
- version: 1.0.0-prerelease.1
- resolution: "@metamask/snaps-execution-environments@npm:1.0.0-prerelease.1"
+"@metamask/snaps-execution-environments@npm:^1.0.2":
+ version: 1.0.2
+ resolution: "@metamask/snaps-execution-environments@npm:1.0.2"
dependencies:
"@metamask/object-multiplex": ^1.2.0
"@metamask/post-message-stream": ^6.1.1
"@metamask/providers": ^10.2.0
- "@metamask/rpc-methods": ^1.0.0-prerelease.1
- "@metamask/snaps-utils": ^1.0.0-prerelease.1
+ "@metamask/rpc-methods": ^1.0.2
+ "@metamask/snaps-utils": ^1.0.2
"@metamask/utils": ^6.0.1
eth-rpc-errors: ^4.0.3
json-rpc-engine: ^6.1.0
@@ -4959,7 +4973,7 @@ __metadata:
ses: ^0.18.1
stream-browserify: ^3.0.0
superstruct: ^1.0.3
- checksum: f52a005f1355bb994ad5437a59efe69d9d873f4ed1624f428e54efeaf9728fccaa87a2801f8c80c8ecf76acc55792da0093c54b94676d3076fae0e4745bf7f96
+ checksum: a0197b68598e3562f47e8b5174cc67bbeeeff87e7f06a034a9be94e4f8ab40c943d1862c123b3ad2e2ef8f4dfd4f96f59beb139cfb3fd64eca67dbbcf9199efa
languageName: node
linkType: hard
@@ -4974,13 +4988,13 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-ui-flask@npm:@metamask/snaps-ui@0.36.1-flask.1, @metamask/snaps-ui@npm:^0.36.1-flask.1":
- version: 0.36.1-flask.1
- resolution: "@metamask/snaps-ui@npm:0.36.1-flask.1"
+"@metamask/snaps-ui-flask@npm:@metamask/snaps-ui@0.37.3-flask.1, @metamask/snaps-ui@npm:^0.37.3-flask.1":
+ version: 0.37.3-flask.1
+ resolution: "@metamask/snaps-ui@npm:0.37.3-flask.1"
dependencies:
"@metamask/utils": ^6.0.1
superstruct: ^1.0.3
- checksum: 85c8426003008836e3461a6287e0199ccc083f9e84053862a2e12a7763141c1a71bfdf9c2b46607a0ae14fdcd93cff22cbee3adf5fcef9364413c91acbeb812d
+ checksum: 0b93f6edeca18afc799f16be8b4e4d758800ea0d68298c70492dc85f74ec9f79c2aa32749f6725bb83a4896fdb1ec95a7d19a10a617484e0a7574ddad7969bd3
languageName: node
linkType: hard
@@ -4994,42 +5008,53 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-ui@npm:^1.0.0-prerelease.1":
- version: 1.0.0-prerelease.1
- resolution: "@metamask/snaps-ui@npm:1.0.0-prerelease.1"
+"@metamask/snaps-ui@npm:^0.37.2-flask.1":
+ version: 0.37.2-flask.1
+ resolution: "@metamask/snaps-ui@npm:0.37.2-flask.1"
dependencies:
"@metamask/utils": ^6.0.1
superstruct: ^1.0.3
- checksum: 58ab96cff1512e3a2ed607277f18c2a17a8c2dfe2e75df4705654cbfbcfcbfb5a7da6975fa81aaf0b58166e9d56cd36e44f4ddc50e10d51a8c1d75c826cd8b17
+ checksum: a52a887411d689a7a0b017b3741c76819567416c7943ca3c71f5b5f8b623605689f370f70caa8a22531d711d10738c913b0d561fcda09a92c38e288d115e6bac
languageName: node
linkType: hard
-"@metamask/snaps-utils-flask@npm:@metamask/snaps-utils@0.36.1-flask.1, @metamask/snaps-utils@npm:^0.36.1-flask.1":
- version: 0.36.1-flask.1
- resolution: "@metamask/snaps-utils@npm:0.36.1-flask.1"
+"@metamask/snaps-ui@npm:^1.0.2":
+ version: 1.0.2
+ resolution: "@metamask/snaps-ui@npm:1.0.2"
+ dependencies:
+ "@metamask/utils": ^6.0.1
+ superstruct: ^1.0.3
+ checksum: eb3d8806803d7e5e7677550eb0eaec4102f8b1b2aad660b408ebb8d3c532666a422176b2ff7c490bfb427c9378449976f16b19c9c5330759dff5283db9fe7224
+ languageName: node
+ linkType: hard
+
+"@metamask/snaps-utils-flask@npm:@metamask/snaps-utils@0.38.0-flask.1, @metamask/snaps-utils@npm:^0.38.0-flask.1":
+ version: 0.38.0-flask.1
+ resolution: "@metamask/snaps-utils@npm:0.38.0-flask.1"
dependencies:
"@babel/core": ^7.20.12
"@babel/types": ^7.18.7
"@metamask/base-controller": ^3.0.0
- "@metamask/key-tree": ^7.1.1
+ "@metamask/key-tree": ^9.0.0
"@metamask/permission-controller": ^4.0.0
"@metamask/providers": ^11.0.0
"@metamask/snaps-registry": ^1.2.1
- "@metamask/snaps-ui": ^0.36.1-flask.1
+ "@metamask/snaps-ui": ^0.37.3-flask.1
"@metamask/utils": ^6.0.1
"@noble/hashes": ^1.3.1
"@scure/base": ^1.1.1
+ chalk: ^4.1.2
cron-parser: ^4.5.0
eth-rpc-errors: ^4.0.3
fast-deep-equal: ^3.1.3
fast-json-stable-stringify: ^2.1.0
is-svg: ^4.4.0
rfdc: ^1.3.0
- semver: ^7.3.7
+ semver: ^7.5.4
ses: ^0.18.1
superstruct: ^1.0.3
validate-npm-package-name: ^5.0.0
- checksum: 9d7d1d77ac03c58c51221a551b4718add396e5591c33dcb0c6799d0ba69ae775bb8c2f55b2bb1642842d13fd7b979437f34d4cabf6ec69832bff050ee6bb46d3
+ checksum: 9b79feabcf3a99f0faa53c87711e0de155807d49dd3a9117933b9636d529fa3f3449bd563535f056fc7cbb3eaffcd9e9703b02985bdb6cfdc090d096d76dad8e
languageName: node
linkType: hard
@@ -5062,9 +5087,39 @@ __metadata:
languageName: node
linkType: hard
-"@metamask/snaps-utils@npm:^1.0.0-prerelease.1":
- version: 1.0.0-prerelease.1
- resolution: "@metamask/snaps-utils@npm:1.0.0-prerelease.1"
+"@metamask/snaps-utils@npm:^0.37.2-flask.1":
+ version: 0.37.2-flask.1
+ resolution: "@metamask/snaps-utils@npm:0.37.2-flask.1"
+ dependencies:
+ "@babel/core": ^7.20.12
+ "@babel/types": ^7.18.7
+ "@metamask/base-controller": ^3.0.0
+ "@metamask/key-tree": ^9.0.0
+ "@metamask/permission-controller": ^4.0.0
+ "@metamask/providers": ^11.0.0
+ "@metamask/snaps-registry": ^1.2.1
+ "@metamask/snaps-ui": ^0.37.2-flask.1
+ "@metamask/utils": ^6.0.1
+ "@noble/hashes": ^1.3.1
+ "@scure/base": ^1.1.1
+ chalk: ^4.1.2
+ cron-parser: ^4.5.0
+ eth-rpc-errors: ^4.0.3
+ fast-deep-equal: ^3.1.3
+ fast-json-stable-stringify: ^2.1.0
+ is-svg: ^4.4.0
+ rfdc: ^1.3.0
+ semver: ^7.3.7
+ ses: ^0.18.1
+ superstruct: ^1.0.3
+ validate-npm-package-name: ^5.0.0
+ checksum: eeb31013a8af39b5488fdb8a6a72e11c54274e423e0f2560fd5cf4ea0278e278aff60be070c1e5b847d84220f15338e01c4725ce7ebb5f3fc614553ae4235f44
+ languageName: node
+ linkType: hard
+
+"@metamask/snaps-utils@npm:^1.0.2":
+ version: 1.0.2
+ resolution: "@metamask/snaps-utils@npm:1.0.2"
dependencies:
"@babel/core": ^7.18.6
"@babel/types": ^7.18.7
@@ -5073,7 +5128,7 @@ __metadata:
"@metamask/permission-controller": ^4.0.0
"@metamask/providers": ^10.2.1
"@metamask/snaps-registry": ^1.2.1
- "@metamask/snaps-ui": ^1.0.0-prerelease.1
+ "@metamask/snaps-ui": ^1.0.2
"@metamask/utils": ^6.0.1
"@noble/hashes": ^1.1.3
"@scure/base": ^1.1.1
@@ -5082,11 +5137,11 @@ __metadata:
fast-deep-equal: ^3.1.3
fast-json-stable-stringify: ^2.1.0
rfdc: ^1.3.0
- semver: ^7.3.7
- ses: ^0.18.1
+ semver: ^7.5.4
+ ses: ^0.18.7
superstruct: ^1.0.3
validate-npm-package-name: ^5.0.0
- checksum: cd16003c748c60c0db33eaf16189a210e7165abc5e6e913d164c2b20ce6b5bb27df5471fac5913b6ba07f7aff845f37c404fa13c4015448a75cb531418e8442f
+ checksum: e207652c0ba61970f7a298325a75edbd330fc8f62f2a23a6429dd2448db66b59414794e77389b72d007d5b18c21e6331dcb815d2bbe91851843d8ee0902600d9
languageName: node
linkType: hard
@@ -24673,7 +24728,7 @@ __metadata:
"@metamask/forwarder": ^1.1.0
"@metamask/gas-fee-controller": ^6.0.1
"@metamask/jazzicon": ^2.0.0
- "@metamask/key-tree": ^7.0.0
+ "@metamask/key-tree": ^9.0.0
"@metamask/logo": ^3.1.1
"@metamask/message-manager": ^7.0.2
"@metamask/metamask-eth-abis": ^3.0.0
@@ -24687,19 +24742,19 @@ __metadata:
"@metamask/ppom-validator": ^0.0.1
"@metamask/providers": ^11.1.0
"@metamask/rate-limit-controller": ^3.0.0
- "@metamask/rpc-methods": ^1.0.0-prerelease.1
- "@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.36.1-flask.1"
+ "@metamask/rpc-methods": ^1.0.2
+ "@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.37.2-flask.1"
"@metamask/safe-event-emitter": ^2.0.0
"@metamask/scure-bip39": ^2.0.3
"@metamask/signature-controller": ^4.0.1
"@metamask/slip44": ^3.0.0
"@metamask/smart-transactions-controller": ^3.1.0
- "@metamask/snaps-controllers": ^1.0.0-prerelease.1
- "@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.36.1-flask.1"
- "@metamask/snaps-ui": ^1.0.0-prerelease.1
- "@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.36.1-flask.1"
- "@metamask/snaps-utils": ^1.0.0-prerelease.1
- "@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.36.1-flask.1"
+ "@metamask/snaps-controllers": ^1.0.2
+ "@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.38.0-flask.1"
+ "@metamask/snaps-ui": ^1.0.2
+ "@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.37.3-flask.1"
+ "@metamask/snaps-utils": ^1.0.2
+ "@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.38.0-flask.1"
"@metamask/subject-metadata-controller": ^2.0.0
"@metamask/test-dapp": ^7.0.1
"@metamask/utils": ^5.0.0
@@ -31341,14 +31396,14 @@ __metadata:
languageName: node
linkType: hard
-"semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8":
- version: 7.5.0
- resolution: "semver@npm:7.5.0"
+"semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.4":
+ version: 7.5.4
+ resolution: "semver@npm:7.5.4"
dependencies:
lru-cache: ^6.0.0
bin:
semver: bin/semver.js
- checksum: 2d266937756689a76f124ffb4c1ea3e1bbb2b263219f90ada8a11aebebe1280b13bb76cca2ca96bdee3dbc554cbc0b24752eb895b2a51577aa644427e9229f2b
+ checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3
languageName: node
linkType: hard