diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 0b902939e962..0ed09110e4c4 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -1259,9 +1259,8 @@ export default class MetamaskController extends EventEmitter { iframeUrl: new URL(process.env.IFRAME_EXECUTION_ENVIRONMENT_URL), }) : new OffscreenExecutionService({ - // eslint-disable-next-line no-undef - documentUrl: chrome.runtime.getURL('./offscreen.html'), ...snapExecutionServiceArgs, + offscreenPromise: this.offscreenPromise, }); const snapControllerMessenger = this.controllerMessenger.getRestricted({ @@ -1409,7 +1408,6 @@ export default class MetamaskController extends EventEmitter { state: initState.SnapsRegistry, messenger: snapsRegistryMessenger, refetchOnAllowlistMiss: requireAllowlist, - failOnUnavailableRegistry: requireAllowlist, url: { registry: 'https://acl.execution.metamask.io/latest/registry.json', signature: 'https://acl.execution.metamask.io/latest/signature.json', diff --git a/builds.yml b/builds.yml index 7f6dff152578..071d46a91ca7 100644 --- a/builds.yml +++ b/builds.yml @@ -27,7 +27,7 @@ buildTypes: - SEGMENT_WRITE_KEY_REF: SEGMENT_PROD_WRITE_KEY - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.3.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.4.0/index.html - ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management - BTC_BETA_SUPPORT: false # Main build uses the default browser manifest @@ -64,7 +64,7 @@ buildTypes: - SEGMENT_FLASK_WRITE_KEY - ALLOW_LOCAL_SNAPS: true - REQUIRE_SNAPS_ALLOWLIST: false - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.3.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.4.0/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 @@ -89,7 +89,7 @@ buildTypes: - SEGMENT_WRITE_KEY_REF: SEGMENT_MMI_WRITE_KEY - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.3.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.4.0/index.html - MMI_CONFIGURATION_SERVICE_URL: https://configuration.metamask-institutional.io/v2/configuration/default - SUPPORT_LINK: https://mmi-support.metamask.io/hc/en-us - SUPPORT_REQUEST_LINK: https://mmi-support.metamask.io/hc/en-us/requests/new diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 07e649936d21..a6ba4adc9781 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1945,35 +1945,24 @@ "@metamask/utils": true } }, + "@metamask/permission-log-controller>@metamask/json-rpc-engine": { + "packages": { + "@metamask/rpc-errors": true, + "@metamask/safe-event-emitter": true, + "@metamask/utils": true + } + }, "@metamask/phishing-controller": { "globals": { "fetch": true }, "packages": { "@metamask/base-controller": true, - "@metamask/phishing-controller>@metamask/controller-utils": true, + "@metamask/controller-utils": true, "@metamask/phishing-warning>eth-phishing-detect": true, "punycode": true } }, - "@metamask/phishing-controller>@metamask/controller-utils": { - "globals": { - "URL": true, - "console.error": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, - "@metamask/ethjs>@metamask/ethjs-unit": true, - "@metamask/utils": true, - "bn.js": true, - "browserify>buffer": true, - "eslint>fast-deep-equal": true, - "eth-ens-namehash": true - } - }, "@metamask/phishing-warning>eth-phishing-detect": { "packages": { "eslint>optionator>fast-levenshtein": true @@ -2025,9 +2014,9 @@ "@metamask/queued-request-controller": { "packages": { "@metamask/base-controller": true, + "@metamask/permission-log-controller>@metamask/json-rpc-engine": true, "@metamask/rpc-errors": true, "@metamask/selected-network-controller": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, "@metamask/utils": true } }, @@ -2450,13 +2439,6 @@ "crypto.getRandomValues": true } }, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": { - "packages": { - "@metamask/rpc-errors": true, - "@metamask/safe-event-emitter": true, - "@metamask/utils": true - } - }, "@metamask/snaps-controllers>nanoid": { "globals": { "crypto.getRandomValues": true @@ -2474,8 +2456,8 @@ }, "@metamask/snaps-rpc-methods": { "packages": { + "@metamask/permission-controller": true, "@metamask/rpc-errors": true, - "@metamask/snaps-rpc-methods>@metamask/permission-controller": true, "@metamask/snaps-sdk": true, "@metamask/snaps-sdk>@metamask/key-tree": true, "@metamask/snaps-utils": true, @@ -2484,33 +2466,12 @@ "superstruct": true } }, - "@metamask/snaps-rpc-methods>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-rpc-methods>@metamask/permission-controller>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, - "@metamask/snaps-rpc-methods>@metamask/permission-controller>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/snaps-sdk": { "globals": { "fetch": true }, "packages": { "@metamask/rpc-errors": true, - "@metamask/snaps-sdk>fast-xml-parser": true, "@metamask/utils": true, "superstruct": true } @@ -2524,15 +2485,6 @@ "@noble/hashes": true } }, - "@metamask/snaps-sdk>fast-xml-parser": { - "globals": { - "entityName": true, - "val": true - }, - "packages": { - "@metamask/snaps-sdk>fast-xml-parser>strnum": true - } - }, "@metamask/snaps-utils": { "globals": { "File": true, @@ -2549,13 +2501,14 @@ "fetch": true }, "packages": { + "@metamask/permission-controller": true, "@metamask/rpc-errors": true, "@metamask/snaps-sdk": true, "@metamask/snaps-sdk>@metamask/key-tree": true, - "@metamask/snaps-utils>@metamask/permission-controller": true, "@metamask/snaps-utils>@metamask/slip44": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>fast-xml-parser": true, "@metamask/snaps-utils>marked": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, @@ -2567,30 +2520,19 @@ "superstruct": true } }, - "@metamask/snaps-utils>@metamask/permission-controller": { - "globals": { - "console.error": true - }, + "@metamask/snaps-utils>cron-parser": { "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-utils>@metamask/permission-controller>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true + "browserify>browser-resolve": true, + "luxon": true } }, - "@metamask/snaps-utils>@metamask/permission-controller>nanoid": { + "@metamask/snaps-utils>fast-xml-parser": { "globals": { - "crypto.getRandomValues": true - } - }, - "@metamask/snaps-utils>cron-parser": { + "entityName": true, + "val": true + }, "packages": { - "browserify>browser-resolve": true, - "luxon": true + "@metamask/snaps-utils>fast-xml-parser>strnum": true } }, "@metamask/snaps-utils>marked": { diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index ef730087d03c..51d2bd6cf8be 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -1972,35 +1972,24 @@ "@metamask/utils": true } }, + "@metamask/permission-log-controller>@metamask/json-rpc-engine": { + "packages": { + "@metamask/rpc-errors": true, + "@metamask/safe-event-emitter": true, + "@metamask/utils": true + } + }, "@metamask/phishing-controller": { "globals": { "fetch": true }, "packages": { "@metamask/base-controller": true, - "@metamask/phishing-controller>@metamask/controller-utils": true, + "@metamask/controller-utils": true, "@metamask/phishing-warning>eth-phishing-detect": true, "punycode": true } }, - "@metamask/phishing-controller>@metamask/controller-utils": { - "globals": { - "URL": true, - "console.error": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, - "@metamask/ethjs>@metamask/ethjs-unit": true, - "@metamask/utils": true, - "bn.js": true, - "browserify>buffer": true, - "eslint>fast-deep-equal": true, - "eth-ens-namehash": true - } - }, "@metamask/phishing-warning>eth-phishing-detect": { "packages": { "eslint>optionator>fast-levenshtein": true @@ -2104,9 +2093,9 @@ "@metamask/queued-request-controller": { "packages": { "@metamask/base-controller": true, + "@metamask/permission-log-controller>@metamask/json-rpc-engine": true, "@metamask/rpc-errors": true, "@metamask/selected-network-controller": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, "@metamask/utils": true } }, @@ -2538,21 +2527,19 @@ "globals": { "DecompressionStream": true, "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/object-multiplex": true, + "@metamask/permission-controller": true, "@metamask/post-message-stream": true, "@metamask/rpc-errors": true, + "@metamask/snaps-controllers>@metamask/base-controller": true, "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": true, - "@metamask/snaps-controllers>@metamask/permission-controller": true, "@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, @@ -2574,6 +2561,14 @@ "crypto.getRandomValues": true } }, + "@metamask/snaps-controllers>@metamask/base-controller": { + "globals": { + "setTimeout": true + }, + "packages": { + "immer": true + } + }, "@metamask/snaps-controllers>@metamask/json-rpc-engine": { "packages": { "@metamask/rpc-errors": true, @@ -2591,21 +2586,6 @@ "readable-stream": true } }, - "@metamask/snaps-controllers>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-controllers>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, "@metamask/snaps-controllers>concat-stream": { "packages": { "browserify>buffer": true, @@ -2663,8 +2643,8 @@ }, "@metamask/snaps-rpc-methods": { "packages": { + "@metamask/permission-controller": true, "@metamask/rpc-errors": true, - "@metamask/snaps-rpc-methods>@metamask/permission-controller": true, "@metamask/snaps-sdk": true, "@metamask/snaps-sdk>@metamask/key-tree": true, "@metamask/snaps-utils": true, @@ -2673,33 +2653,12 @@ "superstruct": true } }, - "@metamask/snaps-rpc-methods>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-rpc-methods>@metamask/permission-controller>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, - "@metamask/snaps-rpc-methods>@metamask/permission-controller>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/snaps-sdk": { "globals": { "fetch": true }, "packages": { "@metamask/rpc-errors": true, - "@metamask/snaps-sdk>fast-xml-parser": true, "@metamask/utils": true, "superstruct": true } @@ -2713,15 +2672,6 @@ "@noble/hashes": true } }, - "@metamask/snaps-sdk>fast-xml-parser": { - "globals": { - "entityName": true, - "val": true - }, - "packages": { - "@metamask/snaps-sdk>fast-xml-parser>strnum": true - } - }, "@metamask/snaps-utils": { "globals": { "File": true, @@ -2738,13 +2688,14 @@ "fetch": true }, "packages": { + "@metamask/permission-controller": true, "@metamask/rpc-errors": true, "@metamask/snaps-sdk": true, "@metamask/snaps-sdk>@metamask/key-tree": true, - "@metamask/snaps-utils>@metamask/permission-controller": true, "@metamask/snaps-utils>@metamask/slip44": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>fast-xml-parser": true, "@metamask/snaps-utils>marked": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, @@ -2756,26 +2707,6 @@ "superstruct": true } }, - "@metamask/snaps-utils>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-utils>@metamask/permission-controller>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, - "@metamask/snaps-utils>@metamask/permission-controller>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/snaps-utils>@metamask/snaps-registry": { "packages": { "@metamask/message-signing-snap>@noble/curves": true, @@ -2790,6 +2721,15 @@ "luxon": true } }, + "@metamask/snaps-utils>fast-xml-parser": { + "globals": { + "entityName": true, + "val": true + }, + "packages": { + "@metamask/snaps-utils>fast-xml-parser>strnum": true + } + }, "@metamask/snaps-utils>marked": { "globals": { "console.error": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index ef730087d03c..51d2bd6cf8be 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1972,35 +1972,24 @@ "@metamask/utils": true } }, + "@metamask/permission-log-controller>@metamask/json-rpc-engine": { + "packages": { + "@metamask/rpc-errors": true, + "@metamask/safe-event-emitter": true, + "@metamask/utils": true + } + }, "@metamask/phishing-controller": { "globals": { "fetch": true }, "packages": { "@metamask/base-controller": true, - "@metamask/phishing-controller>@metamask/controller-utils": true, + "@metamask/controller-utils": true, "@metamask/phishing-warning>eth-phishing-detect": true, "punycode": true } }, - "@metamask/phishing-controller>@metamask/controller-utils": { - "globals": { - "URL": true, - "console.error": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, - "@metamask/ethjs>@metamask/ethjs-unit": true, - "@metamask/utils": true, - "bn.js": true, - "browserify>buffer": true, - "eslint>fast-deep-equal": true, - "eth-ens-namehash": true - } - }, "@metamask/phishing-warning>eth-phishing-detect": { "packages": { "eslint>optionator>fast-levenshtein": true @@ -2104,9 +2093,9 @@ "@metamask/queued-request-controller": { "packages": { "@metamask/base-controller": true, + "@metamask/permission-log-controller>@metamask/json-rpc-engine": true, "@metamask/rpc-errors": true, "@metamask/selected-network-controller": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, "@metamask/utils": true } }, @@ -2538,21 +2527,19 @@ "globals": { "DecompressionStream": true, "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/object-multiplex": true, + "@metamask/permission-controller": true, "@metamask/post-message-stream": true, "@metamask/rpc-errors": true, + "@metamask/snaps-controllers>@metamask/base-controller": true, "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": true, - "@metamask/snaps-controllers>@metamask/permission-controller": true, "@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, @@ -2574,6 +2561,14 @@ "crypto.getRandomValues": true } }, + "@metamask/snaps-controllers>@metamask/base-controller": { + "globals": { + "setTimeout": true + }, + "packages": { + "immer": true + } + }, "@metamask/snaps-controllers>@metamask/json-rpc-engine": { "packages": { "@metamask/rpc-errors": true, @@ -2591,21 +2586,6 @@ "readable-stream": true } }, - "@metamask/snaps-controllers>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-controllers>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, "@metamask/snaps-controllers>concat-stream": { "packages": { "browserify>buffer": true, @@ -2663,8 +2643,8 @@ }, "@metamask/snaps-rpc-methods": { "packages": { + "@metamask/permission-controller": true, "@metamask/rpc-errors": true, - "@metamask/snaps-rpc-methods>@metamask/permission-controller": true, "@metamask/snaps-sdk": true, "@metamask/snaps-sdk>@metamask/key-tree": true, "@metamask/snaps-utils": true, @@ -2673,33 +2653,12 @@ "superstruct": true } }, - "@metamask/snaps-rpc-methods>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-rpc-methods>@metamask/permission-controller>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, - "@metamask/snaps-rpc-methods>@metamask/permission-controller>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/snaps-sdk": { "globals": { "fetch": true }, "packages": { "@metamask/rpc-errors": true, - "@metamask/snaps-sdk>fast-xml-parser": true, "@metamask/utils": true, "superstruct": true } @@ -2713,15 +2672,6 @@ "@noble/hashes": true } }, - "@metamask/snaps-sdk>fast-xml-parser": { - "globals": { - "entityName": true, - "val": true - }, - "packages": { - "@metamask/snaps-sdk>fast-xml-parser>strnum": true - } - }, "@metamask/snaps-utils": { "globals": { "File": true, @@ -2738,13 +2688,14 @@ "fetch": true }, "packages": { + "@metamask/permission-controller": true, "@metamask/rpc-errors": true, "@metamask/snaps-sdk": true, "@metamask/snaps-sdk>@metamask/key-tree": true, - "@metamask/snaps-utils>@metamask/permission-controller": true, "@metamask/snaps-utils>@metamask/slip44": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>fast-xml-parser": true, "@metamask/snaps-utils>marked": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, @@ -2756,26 +2707,6 @@ "superstruct": true } }, - "@metamask/snaps-utils>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-utils>@metamask/permission-controller>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, - "@metamask/snaps-utils>@metamask/permission-controller>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/snaps-utils>@metamask/snaps-registry": { "packages": { "@metamask/message-signing-snap>@noble/curves": true, @@ -2790,6 +2721,15 @@ "luxon": true } }, + "@metamask/snaps-utils>fast-xml-parser": { + "globals": { + "entityName": true, + "val": true + }, + "packages": { + "@metamask/snaps-utils>fast-xml-parser>strnum": true + } + }, "@metamask/snaps-utils>marked": { "globals": { "console.error": true, diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 80b66dded93f..9bc1c46cbf8c 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -2257,35 +2257,24 @@ "@metamask/utils": true } }, + "@metamask/permission-log-controller>@metamask/json-rpc-engine": { + "packages": { + "@metamask/rpc-errors": true, + "@metamask/safe-event-emitter": true, + "@metamask/utils": true + } + }, "@metamask/phishing-controller": { "globals": { "fetch": true }, "packages": { "@metamask/base-controller": true, - "@metamask/phishing-controller>@metamask/controller-utils": true, + "@metamask/controller-utils": true, "@metamask/phishing-warning>eth-phishing-detect": true, "punycode": true } }, - "@metamask/phishing-controller>@metamask/controller-utils": { - "globals": { - "URL": true, - "console.error": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, - "@metamask/ethjs>@metamask/ethjs-unit": true, - "@metamask/utils": true, - "bn.js": true, - "browserify>buffer": true, - "eslint>fast-deep-equal": true, - "eth-ens-namehash": true - } - }, "@metamask/phishing-warning>eth-phishing-detect": { "packages": { "eslint>optionator>fast-levenshtein": true @@ -2389,9 +2378,9 @@ "@metamask/queued-request-controller": { "packages": { "@metamask/base-controller": true, + "@metamask/permission-log-controller>@metamask/json-rpc-engine": true, "@metamask/rpc-errors": true, "@metamask/selected-network-controller": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, "@metamask/utils": true } }, @@ -2823,21 +2812,19 @@ "globals": { "DecompressionStream": true, "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/object-multiplex": true, + "@metamask/permission-controller": true, "@metamask/post-message-stream": true, "@metamask/rpc-errors": true, + "@metamask/snaps-controllers>@metamask/base-controller": true, "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": true, - "@metamask/snaps-controllers>@metamask/permission-controller": true, "@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, @@ -2859,6 +2846,14 @@ "crypto.getRandomValues": true } }, + "@metamask/snaps-controllers>@metamask/base-controller": { + "globals": { + "setTimeout": true + }, + "packages": { + "immer": true + } + }, "@metamask/snaps-controllers>@metamask/json-rpc-engine": { "packages": { "@metamask/rpc-errors": true, @@ -2876,21 +2871,6 @@ "readable-stream": true } }, - "@metamask/snaps-controllers>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-controllers>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, "@metamask/snaps-controllers>concat-stream": { "packages": { "browserify>buffer": true, @@ -2948,8 +2928,8 @@ }, "@metamask/snaps-rpc-methods": { "packages": { + "@metamask/permission-controller": true, "@metamask/rpc-errors": true, - "@metamask/snaps-rpc-methods>@metamask/permission-controller": true, "@metamask/snaps-sdk": true, "@metamask/snaps-sdk>@metamask/key-tree": true, "@metamask/snaps-utils": true, @@ -2958,33 +2938,12 @@ "superstruct": true } }, - "@metamask/snaps-rpc-methods>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-rpc-methods>@metamask/permission-controller>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, - "@metamask/snaps-rpc-methods>@metamask/permission-controller>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/snaps-sdk": { "globals": { "fetch": true }, "packages": { "@metamask/rpc-errors": true, - "@metamask/snaps-sdk>fast-xml-parser": true, "@metamask/utils": true, "superstruct": true } @@ -2998,15 +2957,6 @@ "@noble/hashes": true } }, - "@metamask/snaps-sdk>fast-xml-parser": { - "globals": { - "entityName": true, - "val": true - }, - "packages": { - "@metamask/snaps-sdk>fast-xml-parser>strnum": true - } - }, "@metamask/snaps-utils": { "globals": { "File": true, @@ -3023,13 +2973,14 @@ "fetch": true }, "packages": { + "@metamask/permission-controller": true, "@metamask/rpc-errors": true, "@metamask/snaps-sdk": true, "@metamask/snaps-sdk>@metamask/key-tree": true, - "@metamask/snaps-utils>@metamask/permission-controller": true, "@metamask/snaps-utils>@metamask/slip44": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>fast-xml-parser": true, "@metamask/snaps-utils>marked": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, @@ -3041,26 +2992,6 @@ "superstruct": true } }, - "@metamask/snaps-utils>@metamask/permission-controller": { - "globals": { - "console.error": true - }, - "packages": { - "@metamask/base-controller": true, - "@metamask/controller-utils": true, - "@metamask/rpc-errors": true, - "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-utils>@metamask/permission-controller>nanoid": true, - "@metamask/utils": true, - "deep-freeze-strict": true, - "immer": true - } - }, - "@metamask/snaps-utils>@metamask/permission-controller>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/snaps-utils>@metamask/snaps-registry": { "packages": { "@metamask/message-signing-snap>@noble/curves": true, @@ -3075,6 +3006,15 @@ "luxon": true } }, + "@metamask/snaps-utils>fast-xml-parser": { + "globals": { + "entityName": true, + "val": true + }, + "packages": { + "@metamask/snaps-utils>fast-xml-parser>strnum": true + } + }, "@metamask/snaps-utils>marked": { "globals": { "console.error": true, diff --git a/package.json b/package.json index 596e3acaf885..13268c62ea59 100644 --- a/package.json +++ b/package.json @@ -223,7 +223,7 @@ "semver@7.3.8": "^7.5.4", "@trezor/schema-utils@npm:1.0.2": "patch:@trezor/schema-utils@npm%3A1.0.2#~/.yarn/patches/@trezor-schema-utils-npm-1.0.2-7dd48689b2.patch", "lavamoat-core@npm:^15.1.1": "patch:lavamoat-core@npm%3A15.1.1#~/.yarn/patches/lavamoat-core-npm-15.1.1-51fbe39988.patch", - "@metamask/snaps-sdk": "^4.4.2", + "@metamask/snaps-sdk": "^5.0.0", "@metamask/transaction-controller": "^32.0.0", "@babel/runtime@npm:^7.7.6": "patch:@babel/runtime@npm%3A7.24.0#~/.yarn/patches/@babel-runtime-npm-7.24.0-7eb1dd11a2.patch", "@babel/runtime@npm:^7.9.2": "patch:@babel/runtime@npm%3A7.24.0#~/.yarn/patches/@babel-runtime-npm-7.24.0-7eb1dd11a2.patch", @@ -340,11 +340,11 @@ "@metamask/selected-network-controller": "^15.0.2", "@metamask/signature-controller": "^14.0.1", "@metamask/smart-transactions-controller": "^10.1.2", - "@metamask/snaps-controllers": "^8.4.0", - "@metamask/snaps-execution-environments": "^6.3.0", - "@metamask/snaps-rpc-methods": "^9.1.2", - "@metamask/snaps-sdk": "^4.4.2", - "@metamask/snaps-utils": "^7.5.0", + "@metamask/snaps-controllers": "^9.0.0", + "@metamask/snaps-execution-environments": "^6.4.0", + "@metamask/snaps-rpc-methods": "^9.1.3", + "@metamask/snaps-sdk": "^5.0.0", + "@metamask/snaps-utils": "^7.6.0", "@metamask/transaction-controller": "^32.0.0", "@metamask/user-operation-controller": "^10.0.0", "@metamask/utils": "^8.2.1", diff --git a/test/e2e/snaps/enums.js b/test/e2e/snaps/enums.js index 5732b1b7f335..daeaf9db924f 100644 --- a/test/e2e/snaps/enums.js +++ b/test/e2e/snaps/enums.js @@ -1,3 +1,3 @@ module.exports = { - TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/snaps/test-snaps/2.6.1/', + TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/snaps/test-snaps/2.9.0/', }; diff --git a/ui/components/app/snaps/snap-ui-renderer/components/row.ts b/ui/components/app/snaps/snap-ui-renderer/components/row.ts index 153da8fc8148..b57425250c7a 100644 --- a/ui/components/app/snaps/snap-ui-renderer/components/row.ts +++ b/ui/components/app/snaps/snap-ui-renderer/components/row.ts @@ -9,6 +9,7 @@ export const row: UIComponentFactory = ({ element, ...params }) => ({ props: { label: element.props.label, variant: element.props.variant, + tooltip: element.props.tooltip, style: { // We do this to cause an overhang with certain confirmation row variants marginLeft: '-8px', diff --git a/yarn.lock b/yarn.lock index 82e56c6428e5..38c94a2246c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5526,6 +5526,18 @@ __metadata: languageName: node linkType: hard +"@metamask/json-rpc-middleware-stream@npm:^8.0.0": + version: 8.0.0 + resolution: "@metamask/json-rpc-middleware-stream@npm:8.0.0" + dependencies: + "@metamask/json-rpc-engine": "npm:^9.0.0" + "@metamask/safe-event-emitter": "npm:^3.0.0" + "@metamask/utils": "npm:^8.3.0" + readable-stream: "npm:^3.6.2" + checksum: 10/0b32021714032093311f72ede6671d14eb4faf39a379ce12ea98b4621f24e0e41332bca966329f308159eb5884c8d376297c45bbe8ea9c0b7b09f7ce0810bef9 + languageName: node + linkType: hard + "@metamask/key-tree@npm:^9.1.1": version: 9.1.1 resolution: "@metamask/key-tree@npm:9.1.1" @@ -5913,16 +5925,29 @@ __metadata: languageName: node linkType: hard +"@metamask/phishing-controller@npm:^10.0.0": + version: 10.0.0 + resolution: "@metamask/phishing-controller@npm:10.0.0" + dependencies: + "@metamask/base-controller": "npm:^6.0.0" + "@metamask/controller-utils": "npm:^11.0.0" + "@types/punycode": "npm:^2.1.0" + eth-phishing-detect: "npm:^1.2.0" + punycode: "npm:^2.1.1" + checksum: 10/aef6fbd540f4b3c04400166aef16a7dadaee8414879269b3148cc965c803f29402115fa64de9e5e059baad6afdd5cdc749c02c964cda685642bb84d12a7aace1 + languageName: node + linkType: hard + "@metamask/phishing-controller@npm:^9.0.1, @metamask/phishing-controller@npm:^9.0.3": - version: 9.0.3 - resolution: "@metamask/phishing-controller@npm:9.0.3" + version: 9.0.4 + resolution: "@metamask/phishing-controller@npm:9.0.4" dependencies: "@metamask/base-controller": "npm:^5.0.2" - "@metamask/controller-utils": "npm:^9.1.0" + "@metamask/controller-utils": "npm:^10.0.0" "@types/punycode": "npm:^2.1.0" eth-phishing-detect: "npm:^1.2.0" punycode: "npm:^2.1.1" - checksum: 10/effc72b2fa136e8d0c2dfd2bef45ade7ae07ac5fa6ac79b3b3de988cb2cbf29b3069ea1297f6297a62cfe73e281dec6a8e948ba4fe644a7e924202b17289d384 + checksum: 10/e68258c3dfedd7a60a040f8b58577ee98cc4566a3893a047b7b620edd72e98c8f2f75056332457b9773932c3ae8cbc7c66bbe0792e07de31dff895a9b77d081b languageName: node linkType: hard @@ -6195,7 +6220,7 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-controllers@npm:^8.1.1, @metamask/snaps-controllers@npm:^8.4.0": +"@metamask/snaps-controllers@npm:^8.1.1": version: 8.4.0 resolution: "@metamask/snaps-controllers@npm:8.4.0" dependencies: @@ -6232,22 +6257,59 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-execution-environments@npm:^6.3.0": - version: 6.3.0 - resolution: "@metamask/snaps-execution-environments@npm:6.3.0" +"@metamask/snaps-controllers@npm:^9.0.0": + version: 9.0.0 + resolution: "@metamask/snaps-controllers@npm:9.0.0" dependencies: - "@metamask/json-rpc-engine": "npm:^8.0.1" + "@metamask/approval-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^6.0.0" + "@metamask/json-rpc-engine": "npm:^9.0.0" + "@metamask/json-rpc-middleware-stream": "npm:^8.0.0" + "@metamask/object-multiplex": "npm:^2.0.0" + "@metamask/permission-controller": "npm:^10.0.0" + "@metamask/phishing-controller": "npm:^10.0.0" + "@metamask/post-message-stream": "npm:^8.1.0" + "@metamask/rpc-errors": "npm:^6.2.1" + "@metamask/snaps-registry": "npm:^3.1.0" + "@metamask/snaps-rpc-methods": "npm:^9.1.3" + "@metamask/snaps-sdk": "npm:^5.0.0" + "@metamask/snaps-utils": "npm:^7.6.0" + "@metamask/utils": "npm:^8.3.0" + "@xstate/fsm": "npm:^2.0.0" + browserify-zlib: "npm:^0.2.0" + concat-stream: "npm:^2.0.0" + fast-deep-equal: "npm:^3.1.3" + get-npm-tarball-url: "npm:^2.0.3" + immer: "npm:^9.0.6" + nanoid: "npm:^3.1.31" + readable-stream: "npm:^3.6.2" + readable-web-to-node-stream: "npm:^3.0.2" + tar-stream: "npm:^3.1.7" + peerDependencies: + "@metamask/snaps-execution-environments": ^6.4.0 + peerDependenciesMeta: + "@metamask/snaps-execution-environments": + optional: true + checksum: 10/12e89e622865025e89c0f06f34e9dad278f91b3621e2b9944b154a7f190e5b47d5a899beb65e431627e023ebcd00969c492a280a5051239b57ed24cf5c3347ec + languageName: node + linkType: hard + +"@metamask/snaps-execution-environments@npm:^6.4.0": + version: 6.4.0 + resolution: "@metamask/snaps-execution-environments@npm:6.4.0" + dependencies: + "@metamask/json-rpc-engine": "npm:^9.0.0" "@metamask/object-multiplex": "npm:^2.0.0" "@metamask/post-message-stream": "npm:^8.1.0" "@metamask/providers": "npm:^17.0.0" "@metamask/rpc-errors": "npm:^6.2.1" - "@metamask/snaps-sdk": "npm:^4.4.0" - "@metamask/snaps-utils": "npm:^7.4.0" + "@metamask/snaps-sdk": "npm:^5.0.0" + "@metamask/snaps-utils": "npm:^7.6.0" "@metamask/utils": "npm:^8.3.0" nanoid: "npm:^3.1.31" readable-stream: "npm:^3.6.2" superstruct: "npm:^1.0.3" - checksum: 10/9ee030a5b8134cc4a4dad533e23e09a5008f66b3b87b05f74b6e1c2988dd3e1c9c9f961e0e549867034b20270edbddc1e9f6dcb99d8c2424e3f227e3e869056a + checksum: 10/ef487a7b8e2b1aa46c214d06e14d482a741abdc75f5904ff61f38b019cd253422cd5ae95fba7263b0fab57256eb081a3c44eeafcdff8ad71d5bf9163d65fd5dc languageName: node linkType: hard @@ -6263,49 +6325,48 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-rpc-methods@npm:^9.1.2": - version: 9.1.2 - resolution: "@metamask/snaps-rpc-methods@npm:9.1.2" +"@metamask/snaps-rpc-methods@npm:^9.1.2, @metamask/snaps-rpc-methods@npm:^9.1.3": + version: 9.1.3 + resolution: "@metamask/snaps-rpc-methods@npm:9.1.3" dependencies: "@metamask/key-tree": "npm:^9.1.1" - "@metamask/permission-controller": "npm:^9.0.2" + "@metamask/permission-controller": "npm:^10.0.0" "@metamask/rpc-errors": "npm:^6.2.1" - "@metamask/snaps-sdk": "npm:^4.4.1" - "@metamask/snaps-utils": "npm:^7.4.1" + "@metamask/snaps-sdk": "npm:^5.0.0" + "@metamask/snaps-utils": "npm:^7.6.0" "@metamask/utils": "npm:^8.3.0" "@noble/hashes": "npm:^1.3.1" superstruct: "npm:^1.0.3" - checksum: 10/c24bcf81c4a53dc600ba63bddbaf4b307ac53517081a47417970ccc5e50e5ef385228ec1a18df7f24151e438040a20e7a3dd982d683720a4143ccbedc67ad057 + checksum: 10/d346f12fb170dac694b4b5d1580fe9bc212cd266cece063636be85c442be0a7d0fa98e1d93d999da3dc67a9b5ce49c5a67e5345567b97062dd94e7d10c4e2959 languageName: node linkType: hard -"@metamask/snaps-sdk@npm:^4.4.2": - version: 4.4.2 - resolution: "@metamask/snaps-sdk@npm:4.4.2" +"@metamask/snaps-sdk@npm:^5.0.0": + version: 5.0.0 + resolution: "@metamask/snaps-sdk@npm:5.0.0" dependencies: "@metamask/key-tree": "npm:^9.1.1" "@metamask/providers": "npm:^17.0.0" "@metamask/rpc-errors": "npm:^6.2.1" "@metamask/utils": "npm:^8.3.0" - fast-xml-parser: "npm:^4.3.4" superstruct: "npm:^1.0.3" - checksum: 10/32be48679eb306ec97c2ee16b4146ce69875e665feb61c04f7e63a23361c445b49ad4a0c8f6176560e7973b09c56e5a26055ba7cd894d67111c8c3cedf90dc4f + checksum: 10/2419edb193c32fbd7292ebddbe37e9af6b09dc175fa03b74e9b732b859cdd1b6ddd5d18d19dcf0d550fdcfdb6210ec89168e020c382d3cf41178f51e0e1e888c languageName: node linkType: hard -"@metamask/snaps-utils@npm:^7.1.0, @metamask/snaps-utils@npm:^7.4.0, @metamask/snaps-utils@npm:^7.4.1, @metamask/snaps-utils@npm:^7.5.0": - version: 7.5.0 - resolution: "@metamask/snaps-utils@npm:7.5.0" +"@metamask/snaps-utils@npm:^7.1.0, @metamask/snaps-utils@npm:^7.4.0, @metamask/snaps-utils@npm:^7.5.0, @metamask/snaps-utils@npm:^7.6.0": + version: 7.6.0 + resolution: "@metamask/snaps-utils@npm:7.6.0" dependencies: "@babel/core": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@metamask/base-controller": "npm:^5.0.2" + "@metamask/base-controller": "npm:^6.0.0" "@metamask/key-tree": "npm:^9.1.1" - "@metamask/permission-controller": "npm:^9.0.2" + "@metamask/permission-controller": "npm:^10.0.0" "@metamask/rpc-errors": "npm:^6.2.1" "@metamask/slip44": "npm:^3.1.0" "@metamask/snaps-registry": "npm:^3.1.0" - "@metamask/snaps-sdk": "npm:^4.4.2" + "@metamask/snaps-sdk": "npm:^5.0.0" "@metamask/utils": "npm:^8.3.0" "@noble/hashes": "npm:^1.3.1" "@scure/base": "npm:^1.1.1" @@ -6313,13 +6374,14 @@ __metadata: cron-parser: "npm:^4.5.0" fast-deep-equal: "npm:^3.1.3" fast-json-stable-stringify: "npm:^2.1.0" + fast-xml-parser: "npm:^4.3.4" marked: "npm:^12.0.1" rfdc: "npm:^1.3.0" semver: "npm:^7.5.4" ses: "npm:^1.1.0" superstruct: "npm:^1.0.3" validate-npm-package-name: "npm:^5.0.0" - checksum: 10/34e22ee984d99f692db7d0f3fdb6426ba5ea31f3d83b9dfd65f074eb5e52d916f675cf631430bc4c5e369b85052e08ccc04f0f84bbfca1c07ccab3e35a7e4fe7 + checksum: 10/e81e0185ab1678822b47e400c4422023449be1641bea7ce3d679386257545091ecc73c9a4626c0ed585d93d9fe3a1354dc8e4b8310c27c33871f7fb0bb029506 languageName: node linkType: hard @@ -25026,11 +25088,11 @@ __metadata: "@metamask/selected-network-controller": "npm:^15.0.2" "@metamask/signature-controller": "npm:^14.0.1" "@metamask/smart-transactions-controller": "npm:^10.1.2" - "@metamask/snaps-controllers": "npm:^8.4.0" - "@metamask/snaps-execution-environments": "npm:^6.3.0" - "@metamask/snaps-rpc-methods": "npm:^9.1.2" - "@metamask/snaps-sdk": "npm:^4.4.2" - "@metamask/snaps-utils": "npm:^7.5.0" + "@metamask/snaps-controllers": "npm:^9.0.0" + "@metamask/snaps-execution-environments": "npm:^6.4.0" + "@metamask/snaps-rpc-methods": "npm:^9.1.3" + "@metamask/snaps-sdk": "npm:^5.0.0" + "@metamask/snaps-utils": "npm:^7.6.0" "@metamask/test-bundler": "npm:^1.0.0" "@metamask/test-dapp": "npm:^8.4.0" "@metamask/transaction-controller": "npm:^32.0.0"