From 2079594718d0e80ac4cdd573b55ef49fbbeb6b5b Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 2 May 2024 07:41:17 -0230 Subject: [PATCH 1/5] v11.14.5 --- CHANGELOG.md | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dd8ff84720f..ca90de041691 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.14.5] + ## [11.14.4] ### Fixed - Fix bug that could cause safe-transfer-from transactions to be converted to transfer-from transactions, by removing the edit button on the safe-transfer-from confirmation screens ([#24287](https://github.com/MetaMask/metamask-extension/pull/24287)) @@ -4625,7 +4627,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.14.4...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.14.5...HEAD +[11.14.5]: https://github.com/MetaMask/metamask-extension/compare/v11.14.4...v11.14.5 [11.14.4]: https://github.com/MetaMask/metamask-extension/compare/v11.14.3...v11.14.4 [11.14.3]: https://github.com/MetaMask/metamask-extension/compare/v11.14.2...v11.14.3 [11.14.2]: https://github.com/MetaMask/metamask-extension/compare/v11.14.1...v11.14.2 diff --git a/package.json b/package.json index 684d7ca7098b..996ed7df03e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "11.14.4", + "version": "11.14.5", "private": true, "repository": { "type": "git", From 8c9ed8f693313c685c43d8808d58a3d4f168523d Mon Sep 17 00:00:00 2001 From: Derek Brans Date: Thu, 2 May 2024 10:45:01 -0400 Subject: [PATCH 2/5] cherry-pick fix NFT mint simulations to v11.14.5 (#24350) cherry-pick fix NFT mint simulations by updating transaction-controller (https://github.com/MetaMask/metamask-extension/pull/24306) to v11.14.5 NOTE: This commit is not a cherry-pick of an existing commit. To ensure peer dependencies were met, yarn add @metamask/transaction-controller@^28.1.1 was run against v11.14.5 and the results were committed. --------- Co-authored-by: MetaMask Bot --- builds.yml | 2 +- lavamoat/browserify/beta/policy.json | 89 ++++++++++++++++++++--- lavamoat/browserify/desktop/policy.json | 89 ++++++++++++++++++++--- lavamoat/browserify/flask/policy.json | 89 ++++++++++++++++++++--- lavamoat/browserify/main/policy.json | 89 ++++++++++++++++++++--- lavamoat/browserify/mmi/policy.json | 89 ++++++++++++++++++++--- package.json | 2 +- yarn.lock | 96 ++++++++++++++++--------- 8 files changed, 458 insertions(+), 87 deletions(-) diff --git a/builds.yml b/builds.yml index bf949e39bc78..0e49f72bec6d 100644 --- a/builds.yml +++ b/builds.yml @@ -103,7 +103,7 @@ buildTypes: env: - INFURA_MMI_PROJECT_ID - SEGMENT_MMI_WRITE_KEY - - SENTRY_MMI_DSN + - SENTRY_MMI_DSN: '' - INFURA_ENV_KEY_REF: INFURA_MMI_PROJECT_ID - SEGMENT_WRITE_KEY_REF: SEGMENT_MMI_WRITE_KEY - ALLOW_LOCAL_SNAPS: false diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index ea011ec9acb3..8bb54d085812 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -175,8 +175,8 @@ }, "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true } }, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": { @@ -184,14 +184,32 @@ "TextEncoder": true }, "packages": { - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": { "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@metamask/utils>@scure/base": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true, + "@metamask/utils>@scure/base": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethersproject/abi": { @@ -1394,8 +1412,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1403,6 +1421,16 @@ "eth-ens-namehash": true } }, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/gas-fee-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -1660,8 +1688,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1669,6 +1697,16 @@ "eth-ens-namehash": true } }, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/network-controller>@metamask/eth-json-rpc-infura": { "globals": { "setTimeout": true @@ -2136,8 +2174,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2145,6 +2183,16 @@ "eth-ens-namehash": true } }, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/snaps-utils>@metamask/permission-controller>@metamask/json-rpc-engine": { "packages": { "@metamask/providers>@metamask/rpc-errors": true, @@ -2239,6 +2287,7 @@ "@metamask/transaction-controller>nonce-tracker": true, "@metamask/utils": true, "bn.js": true, + "browserify>buffer": true, "eth-method-registry": true, "fast-json-patch": true, "lodash": true, @@ -2263,8 +2312,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2272,6 +2321,16 @@ "eth-ens-namehash": true } }, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/transaction-controller>nonce-tracker": { "packages": { "@ethersproject/providers": true, @@ -2326,8 +2385,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2335,6 +2394,16 @@ "eth-ens-namehash": true } }, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/utils": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json index 39f552db13b3..cd3603fed463 100644 --- a/lavamoat/browserify/desktop/policy.json +++ b/lavamoat/browserify/desktop/policy.json @@ -175,8 +175,8 @@ }, "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true } }, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": { @@ -184,14 +184,32 @@ "TextEncoder": true }, "packages": { - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": { "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@metamask/utils>@scure/base": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true, + "@metamask/utils>@scure/base": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethersproject/abi": { @@ -1479,8 +1497,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1488,6 +1506,16 @@ "eth-ens-namehash": true } }, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/gas-fee-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -1745,8 +1773,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1754,6 +1782,16 @@ "eth-ens-namehash": true } }, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/network-controller>@metamask/eth-json-rpc-infura": { "globals": { "setTimeout": true @@ -2441,8 +2479,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2450,6 +2488,16 @@ "eth-ens-namehash": true } }, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/snaps-utils>@metamask/permission-controller>@metamask/json-rpc-engine": { "packages": { "@metamask/providers>@metamask/rpc-errors": true, @@ -2552,6 +2600,7 @@ "@metamask/transaction-controller>nonce-tracker": true, "@metamask/utils": true, "bn.js": true, + "browserify>buffer": true, "eth-method-registry": true, "fast-json-patch": true, "lodash": true, @@ -2576,8 +2625,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2585,6 +2634,16 @@ "eth-ens-namehash": true } }, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/transaction-controller>nonce-tracker": { "packages": { "@ethersproject/providers": true, @@ -2639,8 +2698,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2648,6 +2707,16 @@ "eth-ens-namehash": true } }, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/utils": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 8af9fed295a8..81b2f4ccf653 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -175,8 +175,8 @@ }, "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true } }, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": { @@ -184,14 +184,32 @@ "TextEncoder": true }, "packages": { - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": { "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@metamask/utils>@scure/base": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true, + "@metamask/utils>@scure/base": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethersproject/abi": { @@ -1479,8 +1497,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1488,6 +1506,16 @@ "eth-ens-namehash": true } }, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/gas-fee-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -1745,8 +1773,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1754,6 +1782,16 @@ "eth-ens-namehash": true } }, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/network-controller>@metamask/eth-json-rpc-infura": { "globals": { "setTimeout": true @@ -2493,8 +2531,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2502,6 +2540,16 @@ "eth-ens-namehash": true } }, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/snaps-utils>@metamask/permission-controller>@metamask/json-rpc-engine": { "packages": { "@metamask/providers>@metamask/rpc-errors": true, @@ -2604,6 +2652,7 @@ "@metamask/transaction-controller>nonce-tracker": true, "@metamask/utils": true, "bn.js": true, + "browserify>buffer": true, "eth-method-registry": true, "fast-json-patch": true, "lodash": true, @@ -2628,8 +2677,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2637,6 +2686,16 @@ "eth-ens-namehash": true } }, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/transaction-controller>nonce-tracker": { "packages": { "@ethersproject/providers": true, @@ -2691,8 +2750,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2700,6 +2759,16 @@ "eth-ens-namehash": true } }, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/utils": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 83a5bc37d2d5..c9d166583bcb 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -175,8 +175,8 @@ }, "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true } }, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": { @@ -184,14 +184,32 @@ "TextEncoder": true }, "packages": { - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": { "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@metamask/utils>@scure/base": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true, + "@metamask/utils>@scure/base": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethersproject/abi": { @@ -1394,8 +1412,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1403,6 +1421,16 @@ "eth-ens-namehash": true } }, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/gas-fee-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -1660,8 +1688,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1669,6 +1697,16 @@ "eth-ens-namehash": true } }, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/network-controller>@metamask/eth-json-rpc-infura": { "globals": { "setTimeout": true @@ -2408,8 +2446,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2417,6 +2455,16 @@ "eth-ens-namehash": true } }, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/snaps-utils>@metamask/permission-controller>@metamask/json-rpc-engine": { "packages": { "@metamask/providers>@metamask/rpc-errors": true, @@ -2519,6 +2567,7 @@ "@metamask/transaction-controller>nonce-tracker": true, "@metamask/utils": true, "bn.js": true, + "browserify>buffer": true, "eth-method-registry": true, "fast-json-patch": true, "lodash": true, @@ -2543,8 +2592,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2552,6 +2601,16 @@ "eth-ens-namehash": true } }, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/transaction-controller>nonce-tracker": { "packages": { "@ethersproject/providers": true, @@ -2606,8 +2665,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2615,6 +2674,16 @@ "eth-ens-namehash": true } }, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/utils": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 9f77db1857d0..76a3331553e5 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -175,8 +175,8 @@ }, "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true } }, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": { @@ -184,14 +184,32 @@ "TextEncoder": true }, "packages": { - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": { "packages": { "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@metamask/utils>@scure/base": true, - "@noble/hashes": true + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true, + "@metamask/utils>@scure/base": true + } + }, + "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true } }, "@ethersproject/abi": { @@ -1533,8 +1551,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1542,6 +1560,16 @@ "eth-ens-namehash": true } }, + "@metamask/gas-fee-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/gas-fee-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -1799,8 +1827,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -1808,6 +1836,16 @@ "eth-ens-namehash": true } }, + "@metamask/network-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/network-controller>@metamask/eth-json-rpc-infura": { "globals": { "setTimeout": true @@ -2547,8 +2585,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2556,6 +2594,16 @@ "eth-ens-namehash": true } }, + "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/snaps-utils>@metamask/permission-controller>@metamask/json-rpc-engine": { "packages": { "@metamask/providers>@metamask/rpc-errors": true, @@ -2658,6 +2706,7 @@ "@metamask/transaction-controller>nonce-tracker": true, "@metamask/utils": true, "bn.js": true, + "browserify>buffer": true, "eth-method-registry": true, "fast-json-patch": true, "lodash": true, @@ -2682,8 +2731,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2691,6 +2740,16 @@ "eth-ens-namehash": true } }, + "@metamask/transaction-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/transaction-controller>nonce-tracker": { "packages": { "@ethersproject/providers": true, @@ -2745,8 +2804,8 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/ethjs>@metamask/ethjs-unit": true, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": true, "@metamask/utils": true, "bn.js": true, "browserify>buffer": true, @@ -2754,6 +2813,16 @@ "eth-ens-namehash": true } }, + "@metamask/user-operation-controller>@metamask/controller-utils>@spruceid/siwe-parser": { + "globals": { + "console.error": true, + "console.log": true + }, + "packages": { + "@metamask/controller-utils>@spruceid/siwe-parser>apg-js": true, + "@noble/hashes": true + } + }, "@metamask/utils": { "globals": { "TextDecoder": true, diff --git a/package.json b/package.json index 996ed7df03e3..8f758b0e6271 100644 --- a/package.json +++ b/package.json @@ -321,7 +321,7 @@ "@metamask/snaps-rpc-methods": "^7.0.1", "@metamask/snaps-sdk": "^3.1.1", "@metamask/snaps-utils": "^7.1.0", - "@metamask/transaction-controller": "^27.0.1", + "@metamask/transaction-controller": "^28.1.1", "@metamask/user-operation-controller": "^6.0.0", "@metamask/utils": "^8.2.1", "@ngraveio/bc-ur": "^1.1.12", diff --git a/yarn.lock b/yarn.lock index e1297788a9b3..066fba52b2e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4116,13 +4116,13 @@ __metadata: languageName: node linkType: hard -"@metamask/base-controller@npm:^5.0.1": - version: 5.0.1 - resolution: "@metamask/base-controller@npm:5.0.1" +"@metamask/base-controller@npm:^5.0.1, @metamask/base-controller@npm:^5.0.2": + version: 5.0.2 + resolution: "@metamask/base-controller@npm:5.0.2" dependencies: "@metamask/utils": "npm:^8.3.0" immer: "npm:^9.0.6" - checksum: 62fe2c0047ea5ae88821ab6bf3e2d72f1b732a9157cd0632a4309721fe84b7e07c21ecdbf24eebfc742d00a53963e9b72bc1bc45540ce1075cf5407cec50d8a2 + checksum: f9c142766d8cdb69c0cc93aa5cfdaeae97a8c126a5f30f75d31bfdebbc57e82574dc5a3743eceb9e3106d182d066d1517fb73991bb2d06d861d25fd1dac87dcc languageName: node linkType: hard @@ -4182,20 +4182,20 @@ __metadata: languageName: node linkType: hard -"@metamask/controller-utils@npm:^9.0.1, @metamask/controller-utils@npm:^9.0.2": - version: 9.0.2 - resolution: "@metamask/controller-utils@npm:9.0.2" +"@metamask/controller-utils@npm:^9.0.1, @metamask/controller-utils@npm:^9.0.2, @metamask/controller-utils@npm:^9.1.0": + version: 9.1.0 + resolution: "@metamask/controller-utils@npm:9.1.0" dependencies: "@ethereumjs/util": "npm:^8.1.0" "@metamask/eth-query": "npm:^4.0.0" "@metamask/ethjs-unit": "npm:^0.3.0" "@metamask/utils": "npm:^8.3.0" - "@spruceid/siwe-parser": "npm:1.1.3" + "@spruceid/siwe-parser": "npm:2.1.0" "@types/bn.js": "npm:^5.1.5" bn.js: "npm:^5.2.1" eth-ens-namehash: "npm:^2.0.8" fast-deep-equal: "npm:^3.1.3" - checksum: edf8f23d349da01bb9e9906bc2825612eaa422f5c13d19b820ee84c3366d79900f9cd98e6e89b02b9ffd241510c1d7615b99b4263ce79a43d88ad4dffdb028f7 + checksum: cc17c0574eea34d80265d39c7410a3cb4ec5718d26f3e1f4252616ae31b431f817754b37c542d9707640508dc1a1dc2a705fc6d51ccc65f84a1ccaec1d7e6c8e languageName: node linkType: hard @@ -4695,16 +4695,16 @@ __metadata: languageName: node linkType: hard -"@metamask/gas-fee-controller@npm:^15.0.0": - version: 15.0.0 - resolution: "@metamask/gas-fee-controller@npm:15.0.0" +"@metamask/gas-fee-controller@npm:^15.1.0": + version: 15.1.1 + resolution: "@metamask/gas-fee-controller@npm:15.1.1" dependencies: - "@metamask/base-controller": "npm:^5.0.1" - "@metamask/controller-utils": "npm:^9.0.2" + "@metamask/base-controller": "npm:^5.0.2" + "@metamask/controller-utils": "npm:^9.1.0" "@metamask/eth-query": "npm:^4.0.0" "@metamask/ethjs-unit": "npm:^0.3.0" "@metamask/network-controller": "npm:^18.1.0" - "@metamask/polling-controller": "npm:^6.0.1" + "@metamask/polling-controller": "npm:^6.0.2" "@metamask/utils": "npm:^8.3.0" "@types/bn.js": "npm:^5.1.5" "@types/uuid": "npm:^8.3.0" @@ -4712,7 +4712,7 @@ __metadata: uuid: "npm:^8.3.2" peerDependencies: "@metamask/network-controller": ^18.0.0 - checksum: f4ca2ca113d543d3f1282df8e171d06a8cd2ce99ad7df54d1796416f9c93dd62d998af09c124fbd5138b4592602c958d30c9fe03a8ed06ccaecd8745cd6a3913 + checksum: 6e0ddf10d4dde13e4da8bb17e7503a68f64369e51958059168f3400941b540dd02df417e60451a5bdb2be9d9fb1d4a11ae9685f811b0a4f1744ff23ce1c7b1ff languageName: node linkType: hard @@ -5235,20 +5235,20 @@ __metadata: languageName: node linkType: hard -"@metamask/polling-controller@npm:^6.0.1": - version: 6.0.1 - resolution: "@metamask/polling-controller@npm:6.0.1" +"@metamask/polling-controller@npm:^6.0.1, @metamask/polling-controller@npm:^6.0.2": + version: 6.0.2 + resolution: "@metamask/polling-controller@npm:6.0.2" dependencies: - "@metamask/base-controller": "npm:^5.0.1" - "@metamask/controller-utils": "npm:^9.0.1" - "@metamask/network-controller": "npm:^18.0.1" + "@metamask/base-controller": "npm:^5.0.2" + "@metamask/controller-utils": "npm:^9.1.0" + "@metamask/network-controller": "npm:^18.1.0" "@metamask/utils": "npm:^8.3.0" "@types/uuid": "npm:^8.3.0" fast-json-stable-stringify: "npm:^2.1.0" uuid: "npm:^8.3.2" peerDependencies: "@metamask/network-controller": ^18.0.0 - checksum: 178f6b978043f824bf841ec03321406e0d095cdb7880cb9fd4f4cbe12e7bef2d13bfdfce31dc58ae9f89694824f994a3385b2d033e14575780bef47e2d12e8e9 + checksum: 86fecbb621621546d2c97a60da85831eba5b57bbd9a4d361865ebe2ff99edff9393e90ffd027d3506d2d8213bc3c4ea7614a4f5b506173d6b1954ff6b43ccd35 languageName: node linkType: hard @@ -5797,9 +5797,9 @@ __metadata: languageName: node linkType: hard -"@metamask/transaction-controller@npm:^27.0.1": - version: 27.0.1 - resolution: "@metamask/transaction-controller@npm:27.0.1" +"@metamask/transaction-controller@npm:^28.1.1": + version: 28.1.1 + resolution: "@metamask/transaction-controller@npm:28.1.1" dependencies: "@ethereumjs/common": "npm:^3.2.0" "@ethereumjs/tx": "npm:^4.2.0" @@ -5809,9 +5809,9 @@ __metadata: "@ethersproject/providers": "npm:^5.7.0" "@metamask/approval-controller": "npm:^6.0.1" "@metamask/base-controller": "npm:^5.0.1" - "@metamask/controller-utils": "npm:^9.0.2" + "@metamask/controller-utils": "npm:^9.1.0" "@metamask/eth-query": "npm:^4.0.0" - "@metamask/gas-fee-controller": "npm:^15.0.0" + "@metamask/gas-fee-controller": "npm:^15.1.0" "@metamask/metamask-eth-abis": "npm:^3.1.1" "@metamask/network-controller": "npm:^18.1.0" "@metamask/rpc-errors": "npm:^6.2.1" @@ -5828,7 +5828,7 @@ __metadata: "@metamask/approval-controller": ^6.0.0 "@metamask/gas-fee-controller": ^15.0.0 "@metamask/network-controller": ^18.0.0 - checksum: aeb682e943120de802f1125a55b4fbd50924cf21d939d264b29562ad302aa59c242eb2ace4a473f0383a3f88bb9b26b3460075797300bbb824ceed8057c170f8 + checksum: 01e6f0e1431e56cc0ef986cbfa99cf37e0a44aade14419c69d815be77847bb33b43049b90c6e6961bb5070ecfe1420c893db8a68c0fd6977d5ec28d9853d6554 languageName: node linkType: hard @@ -5977,13 +5977,20 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.3.3, @noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.2.0, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:^1.3.2, @noble/hashes@npm:^1.3.3, @noble/hashes@npm:~1.3.2": +"@noble/hashes@npm:1.3.3, @noble/hashes@npm:~1.3.2": version: 1.3.3 resolution: "@noble/hashes@npm:1.3.3" checksum: 1025ddde4d24630e95c0818e63d2d54ee131b980fe113312d17ed7468bc18f54486ac86c907685759f8a7e13c2f9b9e83ec7b67d1cc20836f36b5e4a65bb102d languageName: node linkType: hard +"@noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.1.2, @noble/hashes@npm:^1.2.0, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:^1.3.2, @noble/hashes@npm:^1.3.3": + version: 1.4.0 + resolution: "@noble/hashes@npm:1.4.0" + checksum: e156e65794c473794c52fa9d06baf1eb20903d0d96719530f523cc4450f6c721a957c544796e6efd0197b2296e7cd70efeb312f861465e17940a3e3c7e0febc6 + languageName: node + linkType: hard + "@noble/hashes@npm:~1.1.1": version: 1.1.3 resolution: "@noble/hashes@npm:1.1.3" @@ -7253,6 +7260,18 @@ __metadata: languageName: node linkType: hard +"@spruceid/siwe-parser@npm:2.1.0": + version: 2.1.0 + resolution: "@spruceid/siwe-parser@npm:2.1.0" + dependencies: + "@noble/hashes": "npm:^1.1.2" + apg-js: "npm:^4.1.1" + uri-js: "npm:^4.4.1" + valid-url: "npm:^1.0.9" + checksum: 12198f613f15000b5ec2e2f59c4c3c34918c88d48e0c2e2cfdb34ce926b89a13b6f18e7612777ffb8fa25ca2c226577e47c72592e76823b03770b67c54f78d38 + languageName: node + linkType: hard + "@storybook/addon-a11y@npm:^7.4.6": version: 7.4.6 resolution: "@storybook/addon-a11y@npm:7.4.6" @@ -24933,7 +24952,7 @@ __metadata: "@metamask/snaps-utils": "npm:^7.1.0" "@metamask/test-bundler": "npm:^1.0.0" "@metamask/test-dapp": "npm:^8.4.0" - "@metamask/transaction-controller": "npm:^27.0.1" + "@metamask/transaction-controller": "npm:^28.1.1" "@metamask/user-operation-controller": "npm:^6.0.0" "@metamask/utils": "npm:^8.2.1" "@ngraveio/bc-ur": "npm:^1.1.12" @@ -34458,12 +34477,12 @@ __metadata: languageName: node linkType: hard -"uri-js@npm:^4.2.2": - version: 4.2.2 - resolution: "uri-js@npm:4.2.2" +"uri-js@npm:^4.2.2, uri-js@npm:^4.4.1": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" dependencies: punycode: "npm:^2.1.0" - checksum: e9499d30bfa7559acc255ab196bf7be0db9e5e5550cc0dfd8aeaeabbe423c323b18e261b31b996a409465b29f6ad814f8683f0c4f476ee347a57103dba0fb7f7 + checksum: b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb languageName: node linkType: hard @@ -34766,6 +34785,13 @@ __metadata: languageName: node linkType: hard +"valid-url@npm:^1.0.9": + version: 1.0.9 + resolution: "valid-url@npm:1.0.9" + checksum: 343dfaf85eb3691dc8eb93f7bc007be1ee6091e6c6d1a68bf633cb85e4bf2930e34ca9214fb2c3330de5b652510b257a8ee1ff0a0a37df0925e9dabf93ee512d + languageName: node + linkType: hard + "validate-npm-package-license@npm:^3.0.1": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" From 2d9f5f779421aed5cbf1a315de6acab1d0e46339 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 2 May 2024 15:43:40 -0230 Subject: [PATCH 3/5] fix (cherry-pick): "Transaction Finalized" metrics event on transaction confirmation (#24338) (#24353) Cherry-picks 9a7f82a036 (#24338) to v11.14.5 --- app/scripts/lib/transaction/metrics.test.ts | 4 ++-- app/scripts/lib/transaction/metrics.ts | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/scripts/lib/transaction/metrics.test.ts b/app/scripts/lib/transaction/metrics.test.ts index a4eb13918d7d..acf82095ed24 100644 --- a/app/scripts/lib/transaction/metrics.test.ts +++ b/app/scripts/lib/transaction/metrics.test.ts @@ -571,7 +571,7 @@ describe('Transaction metrics', () => { mockTransactionMeta.submittedTime = 123; await handleTransactionConfirmed(mockTransactionMetricsRequest, { - transactionMeta: mockTransactionMeta, + ...mockTransactionMeta, actionId: mockActionId, } as any); @@ -627,7 +627,7 @@ describe('Transaction metrics', () => { mockTransactionMetaWithBlockaid.submittedTime = 123; await handleTransactionConfirmed(mockTransactionMetricsRequest, { - transactionMeta: mockTransactionMetaWithBlockaid, + ...mockTransactionMetaWithBlockaid, actionId: mockActionId, } as any); diff --git a/app/scripts/lib/transaction/metrics.ts b/app/scripts/lib/transaction/metrics.ts index 1335878393a9..108a60557855 100644 --- a/app/scripts/lib/transaction/metrics.ts +++ b/app/scripts/lib/transaction/metrics.ts @@ -92,6 +92,11 @@ export type TransactionEventPayload = { error?: string; }; +export type TransactionMetaEventPayload = TransactionMeta & { + actionId?: string; + error?: string; +}; + /** * This function is called when a transaction is added to the controller. * @@ -185,14 +190,14 @@ export const handleTransactionFailed = async ( */ export const handleTransactionConfirmed = async ( transactionMetricsRequest: TransactionMetricsRequest, - transactionEventPayload: TransactionEventPayload, + transactionEventPayload: TransactionMetaEventPayload, ) => { - if (!transactionEventPayload.transactionMeta) { + if (Object.keys(transactionEventPayload).length === 0) { return; } const extraParams = {} as Record; - const { transactionMeta } = transactionEventPayload; + const transactionMeta = { ...transactionEventPayload }; const { txReceipt } = transactionMeta; extraParams.gas_used = txReceipt?.gasUsed; @@ -209,7 +214,10 @@ export const handleTransactionConfirmed = async ( await createUpdateFinalizeTransactionEventFragment({ eventName: TransactionMetaMetricsEvent.finalized, extraParams, - transactionEventPayload, + transactionEventPayload: { + actionId: transactionMeta.actionId, + transactionMeta, + }, transactionMetricsRequest, }); }; From 949e73314fc0f1200e811c99023facd348e5ecb0 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 2 May 2024 15:43:56 -0230 Subject: [PATCH 4/5] fix (cherry-pick): Fix #24322 - Disable edits for all dapp initiated transactions (#24334) (#24354) Cherry picks 4a1853cf7b (#24322) to v11.14.5 Co-authored-by: David Walsh --- .../dapp-interactions/dapp-tx-edit.spec.js | 6 ++-- ...confirm-page-container-header.component.js | 33 +++++++++++-------- ...rm-page-container-header.component.test.js | 3 ++ .../confirm-page-container.component.js | 1 + .../confirm-send-ether.test.js.snap | 18 +--------- 5 files changed, 27 insertions(+), 34 deletions(-) diff --git a/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js b/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js index 94e4b0084766..df98799a462d 100644 --- a/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js +++ b/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js @@ -56,7 +56,7 @@ describe('Editing confirmations of dapp initiated contract interactions', functi ); }); - it('should show an edit button on a simple ETH send initiated by a dapp', async function () { + it('should NOT show an edit button on a simple ETH send initiated by a dapp', async function () { await withFixtures( { dapp: true, @@ -88,8 +88,8 @@ describe('Editing confirmations of dapp initiated contract interactions', functi ); assert.equal( editTransactionButton, - true, - `Edit transaction button should be visible on a contract interaction created by a dapp`, + false, + `Edit transaction button should not be visible on a simple send transaction created by a dapp`, ); }, ); diff --git a/ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js b/ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js index 2bbda20bd117..8c3e0ad664de 100644 --- a/ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js +++ b/ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import { ENVIRONMENT_TYPE_POPUP, ENVIRONMENT_TYPE_NOTIFICATION, + ORIGIN_METAMASK, } from '../../../../../../shared/constants/app'; import { getEnvironmentType } from '../../../../../../app/scripts/lib/util'; import NetworkDisplay from '../../../../../components/app/network-display'; @@ -18,6 +19,7 @@ export default function ConfirmPageContainerHeader({ accountAddress, showAccountInHeader, children, + origin, }) { const t = useI18nContext(); const windowType = getEnvironmentType(); @@ -48,21 +50,23 @@ export default function ConfirmPageContainerHeader({ ) : ( -
- - onEdit()} + origin === ORIGIN_METAMASK && ( +
- {t('edit')} - -
+ + onEdit()} + > + {t('edit')} + +
+ ) )} {isFullScreen ? null : } @@ -77,4 +81,5 @@ ConfirmPageContainerHeader.propTypes = { showEdit: PropTypes.bool, onEdit: PropTypes.func, children: PropTypes.node, + origin: PropTypes.string, }; diff --git a/ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js b/ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js index e7043c283d19..6a48d8473a8e 100644 --- a/ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js +++ b/ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js @@ -2,6 +2,7 @@ import React from 'react'; import configureStore from 'redux-mock-store'; import { NetworkStatus } from '@metamask/network-controller'; import { NetworkType } from '@metamask/controller-utils'; +import { ORIGIN_METAMASK } from '../../../../../../shared/constants/app'; import { renderWithProvider } from '../../../../../../test/lib/render-helpers'; import { getEnvironmentType } from '../../../../../../app/scripts/lib/util'; import ConfirmPageContainerHeader from '.'; @@ -38,6 +39,7 @@ describe('Confirm Detail Row Component', () => { onEdit: jest.fn(), showAccountInHeader: false, accountAddress: '0xmockAccountAddress', + origin: ORIGIN_METAMASK, }; const { container } = renderWithProvider( @@ -56,6 +58,7 @@ describe('Confirm Detail Row Component', () => { onEdit: jest.fn(), showAccountInHeader: false, accountAddress: '0xmockAccountAddress', + origin: ORIGIN_METAMASK, }; const { container } = renderWithProvider( diff --git a/ui/pages/confirmations/components/confirm-page-container/confirm-page-container.component.js b/ui/pages/confirmations/components/confirm-page-container/confirm-page-container.component.js index 841a12d0e232..ee006040c196 100644 --- a/ui/pages/confirmations/components/confirm-page-container/confirm-page-container.component.js +++ b/ui/pages/confirmations/components/confirm-page-container/confirm-page-container.component.js @@ -219,6 +219,7 @@ const ConfirmPageContainer = (props) => { onEdit={() => onEdit()} showAccountInHeader={showAccountInHeader} accountAddress={fromAddress} + origin={origin} > {hideSenderToRecipient ? null : (
-
- - - Edit - -
-
+ />
Date: Thu, 2 May 2024 16:04:43 -0230 Subject: [PATCH 5/5] Update changelog for v11.14.5 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca90de041691..1a654af5e960 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [11.14.5] +### Fixed +- Prevent users from making fund loss errors while editing transactions by removing the edit button when on any confirmation screen for a transaction proposed by a dapp ([#24322](https://github.com/MetaMask/metamask-extension/pull/24322)) +- Reduce failed simulations on NFT mint confirmations ([#24350]https://github.com/MetaMask/metamask-extension/pull/24350) ## [11.14.4] ### Fixed