From e7c72bc96fde31fd7dfbe9d4ac58ad511c0fd7e5 Mon Sep 17 00:00:00 2001 From: George Marshall Date: Mon, 12 Sep 2022 08:32:09 -0700 Subject: [PATCH 1/5] Fixing lint issues (#15782) --- .../collectible-default-image.stories.js | 4 ++-- .../avatar-network/avatar-network.stories.js | 11 ++++++----- .../avatar-token/avatar-token.stories.js | 10 +++++----- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ui/components/app/collectible-default-image/collectible-default-image.stories.js b/ui/components/app/collectible-default-image/collectible-default-image.stories.js index d4b7a2a69fd5..8439f9ed685f 100644 --- a/ui/components/app/collectible-default-image/collectible-default-image.stories.js +++ b/ui/components/app/collectible-default-image/collectible-default-image.stories.js @@ -30,13 +30,13 @@ export const DefaultStory = (args) => ( DefaultStory.storyName = 'Default'; -export const handleImageClick = (args) => ( +export const HandleImageClick = (args) => (
); -handleImageClick.args = { +HandleImageClick.args = { // eslint-disable-next-line no-alert handleImageClick: () => window.alert('CollectibleDefaultImage clicked!'), }; diff --git a/ui/components/component-library/avatar-network/avatar-network.stories.js b/ui/components/component-library/avatar-network/avatar-network.stories.js index b8eafc496906..5bef253f10b0 100644 --- a/ui/components/component-library/avatar-network/avatar-network.stories.js +++ b/ui/components/component-library/avatar-network/avatar-network.stories.js @@ -61,6 +61,7 @@ export default { const Template = (args) => { return ; }; + export const DefaultStory = Template.bind({}); DefaultStory.storyName = 'Default'; @@ -74,15 +75,15 @@ export const Size = (args) => ( ); -export const networkName = Template.bind({}); -networkName.args = { +export const NetworkName = Template.bind({}); +NetworkName.args = { networkImageUrl: '', }; -export const networkImageUrl = Template.bind({}); +export const NetworkImageUrl = Template.bind({}); -export const showHalo = Template.bind({}); -showHalo.args = { +export const ShowHalo = Template.bind({}); +ShowHalo.args = { showHalo: true, }; diff --git a/ui/components/component-library/avatar-token/avatar-token.stories.js b/ui/components/component-library/avatar-token/avatar-token.stories.js index f1400ebd9e76..b0f8eb1f3e7c 100644 --- a/ui/components/component-library/avatar-token/avatar-token.stories.js +++ b/ui/components/component-library/avatar-token/avatar-token.stories.js @@ -75,15 +75,15 @@ export const Size = (args) => ( ); -export const tokenName = Template.bind({}); -tokenName.args = { +export const TokenName = Template.bind({}); +TokenName.args = { tokenImageUrl: '', }; -export const tokenImageUrl = Template.bind({}); +export const TokenImageUrl = Template.bind({}); -export const showHalo = Template.bind({}); -showHalo.args = { +export const ShowHalo = Template.bind({}); +ShowHalo.args = { showHalo: true, }; From 45916b962432f25aa7f9a9c839e12ada7f92c59a Mon Sep 17 00:00:00 2001 From: Taylor Monahan <7924827+tayvano@users.noreply.github.com> Date: Mon, 12 Sep 2022 08:56:19 -0700 Subject: [PATCH 2/5] fix issue where signing a message sometimes doesn't allow you to scroll to the bottom (#15788) * fix issue wherein signing a message sometimes doesn't allow you to scroll all the way to the bottom done in a way to make it as mergeable as possible * Fixing length-zero-no-unit lint issue Co-authored-by: ryanml --- .../app/signature-request/signature-request-footer/index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/components/app/signature-request/signature-request-footer/index.scss b/ui/components/app/signature-request/signature-request-footer/index.scss index 89fe1ffd2fe6..0caf6a2be136 100644 --- a/ui/components/app/signature-request/signature-request-footer/index.scss +++ b/ui/components/app/signature-request/signature-request-footer/index.scss @@ -1,6 +1,6 @@ .signature-request-footer { display: flex; - border-top: 1px solid var(--color-border-muted); + box-shadow: inset 0 1px 0 var(--color-border-muted); button { text-transform: uppercase; From 398b93cf51982786746266589ac58b83a8a9289a Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Mon, 12 Sep 2022 18:36:40 +0200 Subject: [PATCH 3/5] [FLASK] Fix crash with certain permissions on the snap settings page (#15797) --- ui/pages/settings/flask/view-snap/view-snap.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/pages/settings/flask/view-snap/view-snap.js b/ui/pages/settings/flask/view-snap/view-snap.js index 0fa9964c16c4..cff1a34cdc4d 100644 --- a/ui/pages/settings/flask/view-snap/view-snap.js +++ b/ui/pages/settings/flask/view-snap/view-snap.js @@ -24,7 +24,11 @@ import { removeSnap, removePermissionsFor, } from '../../../../store/actions'; -import { getSnaps, getSubjectsWithPermission } from '../../../../selectors'; +import { + getSnaps, + getSubjectsWithPermission, + getPermissions, +} from '../../../../selectors'; import { formatDate } from '../../../../helpers/utils/util'; function ViewSnap() { @@ -50,6 +54,7 @@ function ViewSnap() { const connectedSubjects = useSelector((state) => getSubjectsWithPermission(state, snap?.permissionName), ); + const permissions = useSelector((state) => getPermissions(state, snap?.id)); const dispatch = useDispatch(); const onDisconnect = (connectedOrigin, snapPermissionName) => { dispatch( @@ -137,9 +142,7 @@ function ViewSnap() { {t('snapAccess', [snap.manifest.proposedName])} - +
From 7aa2a8a983b7c99e561cfcc62626ae4e099e6d51 Mon Sep 17 00:00:00 2001 From: amerkadicE <97883527+amerkadicE@users.noreply.github.com> Date: Mon, 12 Sep 2022 22:46:48 +0200 Subject: [PATCH 4/5] Replace web3js package with ethersjs package (#15386) Co-authored-by: Alex Donesky --- app/scripts/controllers/detect-tokens.js | 3 - app/scripts/lib/account-tracker.js | 42 ++++----- lavamoat/browserify/beta/policy.json | 109 ++++++++++++----------- lavamoat/browserify/flask/policy.json | 109 ++++++++++++----------- lavamoat/browserify/main/policy.json | 109 ++++++++++++----------- lavamoat/build-system/policy.json | 2 +- package.json | 9 +- 7 files changed, 201 insertions(+), 182 deletions(-) diff --git a/app/scripts/controllers/detect-tokens.js b/app/scripts/controllers/detect-tokens.js index daef5c7ac3db..9c28e708cf55 100644 --- a/app/scripts/controllers/detect-tokens.js +++ b/app/scripts/controllers/detect-tokens.js @@ -1,4 +1,3 @@ -import Web3 from 'web3'; import { warn } from 'loglevel'; import { MINUTE } from '../../../shared/constants/time'; import { MAINNET_CHAIN_ID } from '../../../shared/constants/network'; @@ -112,7 +111,6 @@ export default class DetectTokensController { : tokenList; const tokensToDetect = []; - this.web3.setProvider(this._network._provider); for (const tokenAddress in tokenListUsed) { if ( !this.tokenAddresses.find(({ address }) => @@ -220,7 +218,6 @@ export default class DetectTokensController { return; } this._network = network; - this.web3 = new Web3(network._provider); this._network.store.subscribe(() => { if (this.chainId !== this.getChainIdFromNetworkStore(network)) { this.restartTokenDetection(); diff --git a/app/scripts/lib/account-tracker.js b/app/scripts/lib/account-tracker.js index 8dea01fc9f1e..768da310b94c 100644 --- a/app/scripts/lib/account-tracker.js +++ b/app/scripts/lib/account-tracker.js @@ -12,7 +12,7 @@ import EthQuery from 'eth-query'; import { ObservableStore } from '@metamask/obs-store'; import log from 'loglevel'; import pify from 'pify'; -import Web3 from 'web3'; +import { ethers } from 'ethers'; import SINGLE_CALL_BALANCES_ABI from 'single-call-balance-checker-abi'; import { MAINNET_CHAIN_ID, @@ -41,7 +41,6 @@ import { SINGLE_CALL_BALANCES_ADDRESS_FANTOM, SINGLE_CALL_BALANCES_ADDRESS_ARBITRUM, } from '../constants/contracts'; -import { bnToHex } from './util'; /** * This module is responsible for tracking any number of accounts and caching their current balances & transaction @@ -85,7 +84,7 @@ export default class AccountTracker { this._updateForBlock = this._updateForBlock.bind(this); this.getCurrentChainId = opts.getCurrentChainId; - this.web3 = new Web3(this._provider); + this.ethersProvider = new ethers.providers.Web3Provider(this._provider); } start() { @@ -336,26 +335,29 @@ export default class AccountTracker { */ async _updateAccountsViaBalanceChecker(addresses, deployedContractAddress) { const { accounts } = this.store.getState(); - this.web3.setProvider(this._provider); - const ethContract = this.web3.eth - .contract(SINGLE_CALL_BALANCES_ABI) - .at(deployedContractAddress); - const ethBalance = ['0x0']; - - ethContract.balances(addresses, ethBalance, (error, result) => { - if (error) { - log.warn( - `MetaMask - Account Tracker single call balance fetch failed`, - error, - ); - Promise.all(addresses.map(this._updateAccount.bind(this))); - return; - } + this.ethersProvider = new ethers.providers.Web3Provider(this._provider); + + const ethContract = await new ethers.Contract( + deployedContractAddress, + SINGLE_CALL_BALANCES_ABI, + this.ethersProvider, + ); + const ethBalance = ['0x0000000000000000000000000000000000000000']; + + try { + const balances = await ethContract.balances(addresses, ethBalance); + addresses.forEach((address, index) => { - const balance = result[index] ? bnToHex(result[index]) : '0x0'; + const balance = balances[index] ? balances[index].toHexString() : '0x0'; accounts[address] = { address, balance }; }); this.store.updateState({ accounts }); - }); + } catch (error) { + log.warn( + `MetaMask - Account Tracker single call balance fetch failed`, + error, + ); + Promise.all(addresses.map(this._updateAccount.bind(this))); + } } } diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 3dc28b6cfe4b..effd83c55c99 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -2641,6 +2641,7 @@ "@metamask/controllers>isomorphic-fetch": true, "@metamask/controllers>multiformats": true, "@metamask/controllers>nanoid": true, + "@metamask/controllers>web3": true, "@metamask/controllers>web3-provider-engine": true, "@metamask/metamask-eth-abis": true, "browserify>buffer": true, @@ -2661,8 +2662,7 @@ "jsonschema": true, "punycode": true, "single-call-balance-checker-abi": true, - "uuid": true, - "web3": true + "uuid": true } }, "@metamask/controllers>abort-controller": { @@ -2805,6 +2805,22 @@ "crypto.getRandomValues": true } }, + "@metamask/controllers>web3": { + "globals": { + "Web3": "write", + "XMLHttpRequest": true, + "clearTimeout": true, + "console.error": true, + "setTimeout": true + }, + "packages": { + "@metamask/controllers>web3>bignumber.js": true, + "@metamask/controllers>web3>crypto-js": true, + "@metamask/controllers>web3>utf8": true, + "@metamask/controllers>web3>xhr2-cookies": true, + "browserify>buffer": true + } + }, "@metamask/controllers>web3-provider-engine": { "globals": { "WebSocket": true, @@ -2943,6 +2959,38 @@ "browserify>process": true } }, + "@metamask/controllers>web3>bignumber.js": { + "globals": { + "define": true + }, + "packages": { + "browserify>crypto-browserify": true + } + }, + "@metamask/controllers>web3>crypto-js": { + "globals": { + "define": true + } + }, + "@metamask/controllers>web3>utf8": { + "globals": { + "define": true + } + }, + "@metamask/controllers>web3>xhr2-cookies": { + "globals": { + "console.warn": true + }, + "packages": { + "browserify>buffer": true, + "browserify>https-browserify": true, + "browserify>os-browserify": true, + "browserify>process": true, + "browserify>stream-http": true, + "browserify>url": true, + "pubnub>superagent>cookiejar": true + } + }, "@metamask/eth-ledger-bridge-keyring": { "globals": { "addEventListener": true, @@ -5754,6 +5802,11 @@ "browserify>buffer": true } }, + "pubnub>superagent>cookiejar": { + "globals": { + "console.warn": true + } + }, "pump": { "packages": { "browserify>browser-resolve": true, @@ -6308,18 +6361,7 @@ }, "web3": { "globals": { - "Web3": "write", - "XMLHttpRequest": true, - "clearTimeout": true, - "console.error": true, - "setTimeout": true - }, - "packages": { - "browserify>buffer": true, - "web3>bignumber.js": true, - "web3>crypto-js": true, - "web3>utf8": true, - "web3>xhr2-cookies": true + "XMLHttpRequest": true } }, "web3-stream-provider": { @@ -6338,43 +6380,6 @@ "msCrypto": true } }, - "web3>bignumber.js": { - "globals": { - "define": true - }, - "packages": { - "browserify>crypto-browserify": true - } - }, - "web3>crypto-js": { - "globals": { - "define": true - } - }, - "web3>utf8": { - "globals": { - "define": true - } - }, - "web3>xhr2-cookies": { - "globals": { - "console.warn": true - }, - "packages": { - "browserify>buffer": true, - "browserify>https-browserify": true, - "browserify>os-browserify": true, - "browserify>process": true, - "browserify>stream-http": true, - "browserify>url": true, - "web3>xhr2-cookies>cookiejar": true - } - }, - "web3>xhr2-cookies>cookiejar": { - "globals": { - "console.warn": true - } - }, "webextension-polyfill": { "globals": { "browser": true, @@ -6390,4 +6395,4 @@ } } } -} \ No newline at end of file +} diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 161988fc3aab..a6211fa8bc87 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -2786,6 +2786,7 @@ "@metamask/controllers>isomorphic-fetch": true, "@metamask/controllers>multiformats": true, "@metamask/controllers>nanoid": true, + "@metamask/controllers>web3": true, "@metamask/controllers>web3-provider-engine": true, "@metamask/metamask-eth-abis": true, "browserify>buffer": true, @@ -2806,8 +2807,7 @@ "jsonschema": true, "punycode": true, "single-call-balance-checker-abi": true, - "uuid": true, - "web3": true + "uuid": true } }, "@metamask/controllers>abort-controller": { @@ -2950,6 +2950,22 @@ "crypto.getRandomValues": true } }, + "@metamask/controllers>web3": { + "globals": { + "Web3": "write", + "XMLHttpRequest": true, + "clearTimeout": true, + "console.error": true, + "setTimeout": true + }, + "packages": { + "@metamask/controllers>web3>bignumber.js": true, + "@metamask/controllers>web3>crypto-js": true, + "@metamask/controllers>web3>utf8": true, + "@metamask/controllers>web3>xhr2-cookies": true, + "browserify>buffer": true + } + }, "@metamask/controllers>web3-provider-engine": { "globals": { "WebSocket": true, @@ -3088,6 +3104,38 @@ "browserify>process": true } }, + "@metamask/controllers>web3>bignumber.js": { + "globals": { + "define": true + }, + "packages": { + "browserify>crypto-browserify": true + } + }, + "@metamask/controllers>web3>crypto-js": { + "globals": { + "define": true + } + }, + "@metamask/controllers>web3>utf8": { + "globals": { + "define": true + } + }, + "@metamask/controllers>web3>xhr2-cookies": { + "globals": { + "console.warn": true + }, + "packages": { + "browserify>buffer": true, + "browserify>https-browserify": true, + "browserify>os-browserify": true, + "browserify>process": true, + "browserify>stream-http": true, + "browserify>url": true, + "pubnub>superagent>cookiejar": true + } + }, "@metamask/eth-ledger-bridge-keyring": { "globals": { "addEventListener": true, @@ -6328,6 +6376,11 @@ "browserify>buffer": true } }, + "pubnub>superagent>cookiejar": { + "globals": { + "console.warn": true + } + }, "pump": { "packages": { "browserify>browser-resolve": true, @@ -6939,18 +6992,7 @@ }, "web3": { "globals": { - "Web3": "write", - "XMLHttpRequest": true, - "clearTimeout": true, - "console.error": true, - "setTimeout": true - }, - "packages": { - "browserify>buffer": true, - "web3>bignumber.js": true, - "web3>crypto-js": true, - "web3>utf8": true, - "web3>xhr2-cookies": true + "XMLHttpRequest": true } }, "web3-stream-provider": { @@ -6969,43 +7011,6 @@ "msCrypto": true } }, - "web3>bignumber.js": { - "globals": { - "define": true - }, - "packages": { - "browserify>crypto-browserify": true - } - }, - "web3>crypto-js": { - "globals": { - "define": true - } - }, - "web3>utf8": { - "globals": { - "define": true - } - }, - "web3>xhr2-cookies": { - "globals": { - "console.warn": true - }, - "packages": { - "browserify>buffer": true, - "browserify>https-browserify": true, - "browserify>os-browserify": true, - "browserify>process": true, - "browserify>stream-http": true, - "browserify>url": true, - "web3>xhr2-cookies>cookiejar": true - } - }, - "web3>xhr2-cookies>cookiejar": { - "globals": { - "console.warn": true - } - }, "webextension-polyfill": { "globals": { "browser": true, @@ -7021,4 +7026,4 @@ } } } -} \ No newline at end of file +} diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 3dc28b6cfe4b..effd83c55c99 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -2641,6 +2641,7 @@ "@metamask/controllers>isomorphic-fetch": true, "@metamask/controllers>multiformats": true, "@metamask/controllers>nanoid": true, + "@metamask/controllers>web3": true, "@metamask/controllers>web3-provider-engine": true, "@metamask/metamask-eth-abis": true, "browserify>buffer": true, @@ -2661,8 +2662,7 @@ "jsonschema": true, "punycode": true, "single-call-balance-checker-abi": true, - "uuid": true, - "web3": true + "uuid": true } }, "@metamask/controllers>abort-controller": { @@ -2805,6 +2805,22 @@ "crypto.getRandomValues": true } }, + "@metamask/controllers>web3": { + "globals": { + "Web3": "write", + "XMLHttpRequest": true, + "clearTimeout": true, + "console.error": true, + "setTimeout": true + }, + "packages": { + "@metamask/controllers>web3>bignumber.js": true, + "@metamask/controllers>web3>crypto-js": true, + "@metamask/controllers>web3>utf8": true, + "@metamask/controllers>web3>xhr2-cookies": true, + "browserify>buffer": true + } + }, "@metamask/controllers>web3-provider-engine": { "globals": { "WebSocket": true, @@ -2943,6 +2959,38 @@ "browserify>process": true } }, + "@metamask/controllers>web3>bignumber.js": { + "globals": { + "define": true + }, + "packages": { + "browserify>crypto-browserify": true + } + }, + "@metamask/controllers>web3>crypto-js": { + "globals": { + "define": true + } + }, + "@metamask/controllers>web3>utf8": { + "globals": { + "define": true + } + }, + "@metamask/controllers>web3>xhr2-cookies": { + "globals": { + "console.warn": true + }, + "packages": { + "browserify>buffer": true, + "browserify>https-browserify": true, + "browserify>os-browserify": true, + "browserify>process": true, + "browserify>stream-http": true, + "browserify>url": true, + "pubnub>superagent>cookiejar": true + } + }, "@metamask/eth-ledger-bridge-keyring": { "globals": { "addEventListener": true, @@ -5754,6 +5802,11 @@ "browserify>buffer": true } }, + "pubnub>superagent>cookiejar": { + "globals": { + "console.warn": true + } + }, "pump": { "packages": { "browserify>browser-resolve": true, @@ -6308,18 +6361,7 @@ }, "web3": { "globals": { - "Web3": "write", - "XMLHttpRequest": true, - "clearTimeout": true, - "console.error": true, - "setTimeout": true - }, - "packages": { - "browserify>buffer": true, - "web3>bignumber.js": true, - "web3>crypto-js": true, - "web3>utf8": true, - "web3>xhr2-cookies": true + "XMLHttpRequest": true } }, "web3-stream-provider": { @@ -6338,43 +6380,6 @@ "msCrypto": true } }, - "web3>bignumber.js": { - "globals": { - "define": true - }, - "packages": { - "browserify>crypto-browserify": true - } - }, - "web3>crypto-js": { - "globals": { - "define": true - } - }, - "web3>utf8": { - "globals": { - "define": true - } - }, - "web3>xhr2-cookies": { - "globals": { - "console.warn": true - }, - "packages": { - "browserify>buffer": true, - "browserify>https-browserify": true, - "browserify>os-browserify": true, - "browserify>process": true, - "browserify>stream-http": true, - "browserify>url": true, - "web3>xhr2-cookies>cookiejar": true - } - }, - "web3>xhr2-cookies>cookiejar": { - "globals": { - "console.warn": true - } - }, "webextension-polyfill": { "globals": { "browser": true, @@ -6390,4 +6395,4 @@ } } } -} \ No newline at end of file +} diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 6bee6dcf246b..7bf6ebfbae36 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -8533,4 +8533,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 04e4923937e6..fca4f5294771 100644 --- a/package.json +++ b/package.json @@ -232,7 +232,6 @@ "unicode-confusables": "^0.1.1", "uuid": "^8.3.2", "valid-url": "^1.0.9", - "web3": "^0.20.7", "web3-stream-provider": "^4.0.0", "zxcvbn": "^4.4.2" }, @@ -473,7 +472,13 @@ "eth-lattice-keyring>gridplus-sdk>secp256k1": false, "eth-lattice-keyring>secp256k1": false, "@storybook/react>@pmmmwh/react-refresh-webpack-plugin>core-js-pure": false, - "@testing-library/jest-dom>aria-query>@babel/runtime-corejs3>core-js-pure": false + "@testing-library/jest-dom>aria-query>@babel/runtime-corejs3>core-js-pure": false, + "web3": false, + "web3>web3-bzz": false, + "web3>web3-core>web3-core-requestmanager>web3-providers-ws>websocket>bufferutil": false, + "web3>web3-core>web3-core-requestmanager>web3-providers-ws>websocket>es5-ext": false, + "web3>web3-core>web3-core-requestmanager>web3-providers-ws>websocket>utf-8-validate": false, + "web3>web3-shh": false } } } From ea947ed1a4f619e5775d9be3aa55a959260e0ecc Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 12 Sep 2022 17:05:41 -0400 Subject: [PATCH 5/5] Resolve inconsistency between browsers (#15800) Resolve an inconsistency between Chrome and Firefox with how the contentscript runs in an iframe. This should have no user-facing impact, it's just meant as a safeguard in case something unintentionally gets included in the contentscript. --- app/manifest/v2/chrome.json | 1 + app/manifest/v3/chrome.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/manifest/v2/chrome.json b/app/manifest/v2/chrome.json index e4bb01cdd4b6..9a2d91271d74 100644 --- a/app/manifest/v2/chrome.json +++ b/app/manifest/v2/chrome.json @@ -1,4 +1,5 @@ { + "content_security_policy": "frame-ancestors 'none'", "externally_connectable": { "matches": ["https://metamask.io/*"], "ids": ["*"] diff --git a/app/manifest/v3/chrome.json b/app/manifest/v3/chrome.json index e4bb01cdd4b6..9e21aa058601 100644 --- a/app/manifest/v3/chrome.json +++ b/app/manifest/v3/chrome.json @@ -1,4 +1,7 @@ { + "content_security_policy": { + "extension_pages": "default-src 'self'; frame-ancestors 'none'" + }, "externally_connectable": { "matches": ["https://metamask.io/*"], "ids": ["*"]