1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

[FLASK] snaps-monorepo@0.22.2 (#16161)

* snaps-monorepo@0.22.2

* Update LavaMoat policies

* Fix eth_accounts permission for Snaps

* Update iframe execution environment

* Dedupe yarn.lock and rerun LavaMoat policy gen

* Add policy override for nanoid
This commit is contained in:
Frederik Bolding 2022-10-11 18:56:34 +02:00 committed by GitHub
parent 385e929864
commit d640c9a924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 127 additions and 66 deletions

View File

@ -659,7 +659,7 @@ export default class MetamaskController extends EventEmitter {
///: BEGIN:ONLY_INCLUDE_IN(flask)
this.snapExecutionService = new IframeExecutionService({
iframeUrl: new URL(
'https://metamask.github.io/iframe-execution-environment/0.9.0',
'https://metamask.github.io/iframe-execution-environment/0.9.1',
),
messenger: this.controllerMessenger.getRestricted({
name: 'ExecutionService',

View File

@ -3389,10 +3389,9 @@
"ethers>@ethersproject/wallet>@ethersproject/properties": true
}
},
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": {
"@metamask/rpc-methods>nanoid": {
"globals": {
"TextEncoder": true,
"crypto": true
"crypto.getRandomValues": true
}
},
"@metamask/smart-transactions-controller": {
@ -4525,7 +4524,13 @@
"crypto": true
},
"packages": {
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": {
@ -4681,10 +4686,16 @@
"crypto": true
},
"packages": {
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true,
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true,
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/secp256k1": true
}
},
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/secp256k1": {
"globals": {
"crypto": true

View File

@ -3551,6 +3551,7 @@
"packages": {
"@metamask/rpc-methods>@metamask/controllers": true,
"@metamask/rpc-methods>@metamask/key-tree": true,
"@metamask/rpc-methods>nanoid": true,
"@metamask/snap-utils": true,
"@metamask/snap-utils>superstruct": true,
"eth-block-tracker>@metamask/utils": true,
@ -3586,7 +3587,7 @@
"@metamask/rpc-methods>@metamask/controllers>@ethersproject/abi": true,
"@metamask/rpc-methods>@metamask/controllers>eth-method-registry": true,
"@metamask/rpc-methods>@metamask/controllers>ethereumjs-wallet": true,
"@metamask/rpc-methods>@metamask/controllers>nanoid": true,
"@metamask/rpc-methods>nanoid": true,
"@metamask/smart-transactions-controller>@ethersproject/providers": true,
"browserify>buffer": true,
"browserify>events": true,
@ -3712,10 +3713,10 @@
"@metamask/rpc-methods>@metamask/key-tree": {
"packages": {
"@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": true,
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true,
"@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": true,
"@metamask/rpc-methods>@metamask/key-tree>@scure/base": true,
"@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": true,
"@metamask/snap-utils>@noble/hashes": true,
"@metamask/snap-utils>@scure/base": true,
"browserify>buffer": true
}
},
@ -3727,12 +3728,6 @@
"browserify>browser-resolve": true
}
},
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": {
"globals": {
"crypto": true
@ -3741,16 +3736,15 @@
"browserify>browser-resolve": true
}
},
"@metamask/rpc-methods>@metamask/key-tree>@scure/base": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
}
},
"@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": {
"packages": {
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true,
"@metamask/rpc-methods>@metamask/key-tree>@scure/base": true
"@metamask/snap-utils>@noble/hashes": true,
"@metamask/snap-utils>@scure/base": true
}
},
"@metamask/rpc-methods>nanoid": {
"globals": {
"crypto.getRandomValues": true
}
},
"@metamask/smart-transactions-controller": {
@ -4259,6 +4253,8 @@
"packages": {
"@babel/core": true,
"@babel/core>@babel/types": true,
"@metamask/snap-utils>@noble/hashes": true,
"@metamask/snap-utils>@scure/base": true,
"@metamask/snap-utils>ajv": true,
"@metamask/snap-utils>rfdc": true,
"@metamask/snap-utils>superstruct": true,
@ -4272,6 +4268,18 @@
"semver": true
}
},
"@metamask/snap-utils>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@metamask/snap-utils>@scure/base": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
}
},
"@metamask/snap-utils>rfdc": {
"packages": {
"browserify>buffer": true
@ -5351,7 +5359,13 @@
"crypto": true
},
"packages": {
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": {
@ -5507,10 +5521,16 @@
"crypto": true
},
"packages": {
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true,
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true,
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/secp256k1": true
}
},
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/secp256k1": {
"globals": {
"crypto": true

View File

@ -3389,10 +3389,9 @@
"ethers>@ethersproject/wallet>@ethersproject/properties": true
}
},
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": {
"@metamask/rpc-methods>nanoid": {
"globals": {
"TextEncoder": true,
"crypto": true
"crypto.getRandomValues": true
}
},
"@metamask/smart-transactions-controller": {
@ -4525,7 +4524,13 @@
"crypto": true
},
"packages": {
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": {
@ -4681,10 +4686,16 @@
"crypto": true
},
"packages": {
"@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true,
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true,
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/secp256k1": true
}
},
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/secp256k1": {
"globals": {
"crypto": true

View File

@ -97,6 +97,11 @@
"crypto.getRandomValues": true
}
},
"@metamask/rpc-methods>nanoid": {
"globals": {
"crypto.getRandomValues": true
}
},
"@metamask/controllers>nanoid": {
"globals": {
"crypto.getRandomValues": true

View File

@ -135,11 +135,11 @@
"@metamask/obs-store": "^5.0.0",
"@metamask/post-message-stream": "^4.0.0",
"@metamask/providers": "^10.0.0",
"@metamask/rpc-methods": "^0.22.0",
"@metamask/rpc-methods": "^0.22.2",
"@metamask/slip44": "^2.1.0",
"@metamask/smart-transactions-controller": "^2.3.2",
"@metamask/snap-controllers": "^0.22.0",
"@metamask/snap-utils": "^0.22.0",
"@metamask/snap-controllers": "^0.22.2",
"@metamask/snap-utils": "^0.22.2",
"@ngraveio/bc-ur": "^1.1.6",
"@popperjs/core": "^2.4.0",
"@reduxjs/toolkit": "^1.6.2",

View File

@ -313,7 +313,10 @@ export default class PermissionConnect extends Component {
<SnapInstall
request={permissionsRequest || {}}
approveSnapInstall={(requestId) => {
approvePendingApproval(requestId, true);
approvePendingApproval(requestId, {
...permissionsRequest,
approvedAccounts: selectedAccountAddresses,
});
this.redirect(true);
}}
rejectSnapInstall={(requestId) => {
@ -340,7 +343,10 @@ export default class PermissionConnect extends Component {
<SnapUpdate
request={permissionsRequest || {}}
approveSnapUpdate={(requestId) => {
approvePendingApproval(requestId, true);
approvePendingApproval(requestId, {
...permissionsRequest,
approvedAccounts: selectedAccountAddresses,
});
this.redirect(true);
}}
rejectSnapUpdate={(requestId) => {

View File

@ -3329,16 +3329,16 @@
resolved "https://registry.yarnpkg.com/@metamask/etherscan-link/-/etherscan-link-2.2.0.tgz#76314d0c1405a0669fc4a0a19e0877bd3d0c389f"
integrity sha512-xUgehvgU+ZbzeJ44m4sUtsyf6Dwou+SlYhiKfi6lkRcbWh6Jl3TCi0YM9C7XWgxfnLSdQBO1ndvcp0kslKgMsA==
"@metamask/execution-environments@^0.22.0":
version "0.22.0"
resolved "https://registry.yarnpkg.com/@metamask/execution-environments/-/execution-environments-0.22.0.tgz#2dd67add467e64fc6e992cb36461f20959ed87fd"
integrity sha512-mb5O3HX5Nrt0urAPWohiyB9w465Qk12tF1hXz+vjwFZe4LAbTHza7XsbvTzAy1XD99JjhtLMi+IwaHp8GELcDg==
"@metamask/execution-environments@^0.22.2":
version "0.22.2"
resolved "https://registry.yarnpkg.com/@metamask/execution-environments/-/execution-environments-0.22.2.tgz#174f4e37ed060b81cf29343581f35ad7c3a3182a"
integrity sha512-zfSP8L+KVrHGgZnnjauUpZD6GxDMGB5JI8Oq8BrsEtTZG9gZc7Sn5Jhx+6TuXKft1DLsjb4zM1trnAEgfXZ1aw==
dependencies:
"@metamask/object-multiplex" "^1.2.0"
"@metamask/post-message-stream" "^6.0.0"
"@metamask/providers" "^9.0.0"
"@metamask/snap-types" "^0.22.0"
"@metamask/snap-utils" "^0.22.0"
"@metamask/snap-types" "^0.22.2"
"@metamask/snap-utils" "^0.22.2"
"@metamask/utils" "^3.1.0"
eth-rpc-errors "^4.0.3"
pump "^3.0.0"
@ -3479,17 +3479,18 @@
pump "^3.0.0"
webextension-polyfill-ts "^0.25.0"
"@metamask/rpc-methods@^0.22.0":
version "0.22.0"
resolved "https://registry.yarnpkg.com/@metamask/rpc-methods/-/rpc-methods-0.22.0.tgz#17ee8db33deba5152d531123139fd3ea651e49ef"
integrity sha512-FCVbf68zgHHThG2OAOp9u7iBO1hjIMjo8S85bXsGtStUp9KjiGxnuQhyNK7b/Ny+WuHI+GP26abXRIyS2ampfA==
"@metamask/rpc-methods@^0.22.2":
version "0.22.2"
resolved "https://registry.yarnpkg.com/@metamask/rpc-methods/-/rpc-methods-0.22.2.tgz#4f60dcbbc0f9aebf86099b79639b7a711d4de31d"
integrity sha512-60InoQ9xteiJvpwRfCi8A4rCnBKazkLNuLnIochOuzPTIjH48GdEODaUQzOuwd/WGUNFstUI5yIGAv0NEr2EYA==
dependencies:
"@metamask/controllers" "^31.0.0"
"@metamask/key-tree" "^5.0.2"
"@metamask/snap-utils" "^0.22.0"
"@metamask/snap-utils" "^0.22.2"
"@metamask/types" "^1.1.0"
"@metamask/utils" "^3.1.0"
eth-rpc-errors "^4.0.2"
nanoid "^3.1.31"
superstruct "^0.16.5"
"@metamask/safe-event-emitter@^2.0.0":
@ -3517,19 +3518,19 @@
isomorphic-fetch "^3.0.0"
lodash "^4.17.21"
"@metamask/snap-controllers@^0.22.0":
version "0.22.0"
resolved "https://registry.yarnpkg.com/@metamask/snap-controllers/-/snap-controllers-0.22.0.tgz#bb1dfb7551cfca74b17addad2390ad80a6df8b7a"
integrity sha512-k7TgYyzZna54ns3o9GjnLiHJDT3xvkG4i+zSEJSMPzqAy5Su5p2yMiTe/awEwTVFBMsC9xtX9owc0lArkk8NZw==
"@metamask/snap-controllers@^0.22.2":
version "0.22.2"
resolved "https://registry.yarnpkg.com/@metamask/snap-controllers/-/snap-controllers-0.22.2.tgz#d11ff1c5c35d5b659acb4f1e1365ae5b7055d828"
integrity sha512-QOtzlx9hlo4uCZhnrcYj0ChAL1deHUKS/A9sKUIWcFZpxpce+9mVyAljnz3CJkr2CCH8w7/MkfclDsLcoMci/A==
dependencies:
"@metamask/browser-passworder" "^3.0.0"
"@metamask/controllers" "^31.0.0"
"@metamask/execution-environments" "^0.22.0"
"@metamask/execution-environments" "^0.22.2"
"@metamask/object-multiplex" "^1.1.0"
"@metamask/post-message-stream" "^6.0.0"
"@metamask/rpc-methods" "^0.22.0"
"@metamask/snap-types" "^0.22.0"
"@metamask/snap-utils" "^0.22.0"
"@metamask/rpc-methods" "^0.22.2"
"@metamask/snap-types" "^0.22.2"
"@metamask/snap-utils" "^0.22.2"
"@metamask/utils" "^3.1.0"
"@xstate/fsm" "^2.0.0"
concat-stream "^2.0.0"
@ -3543,23 +3544,25 @@
readable-web-to-node-stream "^3.0.2"
tar-stream "^2.2.0"
"@metamask/snap-types@^0.22.0":
version "0.22.0"
resolved "https://registry.yarnpkg.com/@metamask/snap-types/-/snap-types-0.22.0.tgz#4d74e34eea69a7afe0ad9a4d54be83cf5391bf9e"
integrity sha512-XwJNk+Qbtr7xjuh1Iz7wqybp+xB3H6uRJjlOqtgIoOui9V2zfL/At/FzHMMvaLeUsWJhOVSJP5qmEzCYaOEvmQ==
"@metamask/snap-types@^0.22.2":
version "0.22.2"
resolved "https://registry.yarnpkg.com/@metamask/snap-types/-/snap-types-0.22.2.tgz#590cfdd6088d77df6d103ceabdab4ae4d1bdcf03"
integrity sha512-8/KVU53ctZra7lQ9pjMScOXCBT7b3cmy2nilFDUHRPxEpw9XEgVtQVeekV7AVsXMcLEZdck+8tj5l7KUj5qxHg==
dependencies:
"@metamask/providers" "^9.0.0"
"@metamask/snap-utils" "^0.22.0"
"@metamask/snap-utils" "^0.22.2"
"@metamask/types" "^1.1.0"
"@metamask/snap-utils@^0.22.0":
version "0.22.0"
resolved "https://registry.yarnpkg.com/@metamask/snap-utils/-/snap-utils-0.22.0.tgz#1815eecfc8a388a4ae6744664ff28f58404730ee"
integrity sha512-mwe72I/sVMVogNU+gxUU1P2Kos4S/4lEX1MUz7Hr79jfYzTgwTfxz/gaMubjD6CF2q0ZvF5JQr6OBk6ZRLHhCw==
"@metamask/snap-utils@^0.22.2":
version "0.22.2"
resolved "https://registry.yarnpkg.com/@metamask/snap-utils/-/snap-utils-0.22.2.tgz#040b2fc1c6ccd406b049084d90542f77e9a51572"
integrity sha512-hhQHsHS6xkwmqvPrDnrXgu8IIEtaPwLr7PUwqIDSHBeBgbhlsbS7R63nhMtrRxognLmnWj0xWvAvoz25o+Q/Rw==
dependencies:
"@babel/core" "^7.18.6"
"@metamask/snap-types" "^0.22.0"
"@metamask/snap-types" "^0.22.2"
"@metamask/utils" "^3.1.0"
"@noble/hashes" "^1.1.3"
"@scure/base" "^1.1.1"
ajv "^8.11.0"
eth-rpc-errors "^4.0.3"
fast-deep-equal "^3.1.3"
@ -3626,11 +3629,16 @@
resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.6.0.tgz#b55f7c9e532b478bf1d7c4f609e1f3a37850b583"
integrity sha512-UKju89WV37IUALIMfKhKW3psO8AqmrE/GvH6QbPKjzolQ98zM7WmGUeY+xdIgSf5tqPFf75ZCYMgym6E9Jsw3Q==
"@noble/hashes@1.1.2", "@noble/hashes@^1.0.0", "@noble/hashes@~1.1.1":
"@noble/hashes@1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183"
integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==
"@noble/hashes@^1.0.0", "@noble/hashes@^1.1.3", "@noble/hashes@~1.1.1":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.3.tgz#360afc77610e0a61f3417e497dcf36862e4f8111"
integrity sha512-CE0FCR57H2acVI5UOzIGSSIYxZ6v/HOhDR0Ro9VLyhnzLwx0o8W1mmgaqlEUx4049qJDlIBRztv5k+MM8vbO3A==
"@noble/secp256k1@1.6.3", "@noble/secp256k1@~1.6.0":
version "1.6.3"
resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94"
@ -3781,7 +3789,7 @@
redux-thunk "^2.3.0"
reselect "^4.0.0"
"@scure/base@^1.0.0", "@scure/base@~1.1.0":
"@scure/base@^1.0.0", "@scure/base@^1.1.1", "@scure/base@~1.1.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938"
integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==