From 16bfa1f728db7d4a5005aafd0104742e56c9ec70 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 11 Apr 2023 13:11:26 -0230 Subject: [PATCH] Update the gas fee controller from v1 to v3 (#18466) The gas fee controller has been updated from v1 to v3. The breaking changes for v2 and v3 related to the `@metamask/network-controller` type that was referenced. They don't affect the extension's usage of this package, so they are non-breaking for the extension. Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> --- lavamoat/browserify/beta/policy.json | 7 +--- lavamoat/browserify/desktop/policy.json | 7 +--- lavamoat/browserify/flask/policy.json | 7 +--- lavamoat/browserify/main/policy.json | 7 +--- package.json | 2 +- yarn.lock | 50 +++++++++++++------------ 6 files changed, 31 insertions(+), 49 deletions(-) diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 7d359e522..ed13fb1b9 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1193,7 +1193,7 @@ "setInterval": true }, "packages": { - "@metamask/gas-fee-controller>@metamask/base-controller": true, + "@metamask/base-controller": true, "@metamask/gas-fee-controller>@metamask/controller-utils": true, "eth-query": true, "ethereumjs-util": true, @@ -1201,11 +1201,6 @@ "uuid": true } }, - "@metamask/gas-fee-controller>@metamask/base-controller": { - "packages": { - "immer": true - } - }, "@metamask/gas-fee-controller>@metamask/controller-utils": { "globals": { "console.error": true, diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json index 8fc8f7bcd..0d9164963 100644 --- a/lavamoat/browserify/desktop/policy.json +++ b/lavamoat/browserify/desktop/policy.json @@ -1265,7 +1265,7 @@ "setInterval": true }, "packages": { - "@metamask/gas-fee-controller>@metamask/base-controller": true, + "@metamask/base-controller": true, "@metamask/gas-fee-controller>@metamask/controller-utils": true, "eth-query": true, "ethereumjs-util": true, @@ -1273,11 +1273,6 @@ "uuid": true } }, - "@metamask/gas-fee-controller>@metamask/base-controller": { - "packages": { - "immer": true - } - }, "@metamask/gas-fee-controller>@metamask/controller-utils": { "globals": { "console.error": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 8fc8f7bcd..0d9164963 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -1265,7 +1265,7 @@ "setInterval": true }, "packages": { - "@metamask/gas-fee-controller>@metamask/base-controller": true, + "@metamask/base-controller": true, "@metamask/gas-fee-controller>@metamask/controller-utils": true, "eth-query": true, "ethereumjs-util": true, @@ -1273,11 +1273,6 @@ "uuid": true } }, - "@metamask/gas-fee-controller>@metamask/base-controller": { - "packages": { - "immer": true - } - }, "@metamask/gas-fee-controller>@metamask/controller-utils": { "globals": { "console.error": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 7d359e522..ed13fb1b9 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1193,7 +1193,7 @@ "setInterval": true }, "packages": { - "@metamask/gas-fee-controller>@metamask/base-controller": true, + "@metamask/base-controller": true, "@metamask/gas-fee-controller>@metamask/controller-utils": true, "eth-query": true, "ethereumjs-util": true, @@ -1201,11 +1201,6 @@ "uuid": true } }, - "@metamask/gas-fee-controller>@metamask/base-controller": { - "packages": { - "immer": true - } - }, "@metamask/gas-fee-controller>@metamask/controller-utils": { "globals": { "console.error": true, diff --git a/package.json b/package.json index 2b1815983..47cb164e9 100644 --- a/package.json +++ b/package.json @@ -242,7 +242,7 @@ "@metamask/eth-ledger-bridge-keyring": "^0.13.0", "@metamask/eth-token-tracker": "^4.0.0", "@metamask/etherscan-link": "^2.2.0", - "@metamask/gas-fee-controller": "^1.0.0", + "@metamask/gas-fee-controller": "^3.0.0", "@metamask/jazzicon": "^2.0.0", "@metamask/key-tree": "^7.0.0", "@metamask/logo": "^3.1.1", diff --git a/yarn.lock b/yarn.lock index 4ceafeafb..28686cc9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3984,13 +3984,13 @@ __metadata: languageName: node linkType: hard -"@metamask/gas-fee-controller@npm:^1.0.0": - version: 1.0.0 - resolution: "@metamask/gas-fee-controller@npm:1.0.0" +"@metamask/gas-fee-controller@npm:^3.0.0": + version: 3.0.0 + resolution: "@metamask/gas-fee-controller@npm:3.0.0" dependencies: - "@metamask/base-controller": ~1.0.0 - "@metamask/controller-utils": ~1.0.0 - "@metamask/network-controller": ~1.0.0 + "@metamask/base-controller": ^1.1.2 + "@metamask/controller-utils": ^2.0.0 + "@metamask/network-controller": ^3.0.0 "@types/uuid": ^8.3.0 babel-runtime: ^6.26.0 eth-query: ^2.1.2 @@ -3998,7 +3998,9 @@ __metadata: ethjs-unit: ^0.1.6 immer: ^9.0.6 uuid: ^8.3.2 - checksum: fef5255532a6cd5325ddfbbfec11140e6629c011a8cc6b126672ef7a6e93a327d059935cdc6fc7089562f3277fb70541b5ea54cd31c0e5b350ceebbe73d5d59f + peerDependencies: + "@metamask/network-controller": ^3.0.0 + checksum: 8cdd43a265094dd5e41f0094c278cde351d290446711e6b39de26f842faa993c050e5506cafe8d1c2fb0c4ee3f0f97c5af5fa6528de10e76d071b56fb9673da8 languageName: node linkType: hard @@ -4074,6 +4076,22 @@ __metadata: languageName: node linkType: hard +"@metamask/network-controller@npm:^3.0.0": + version: 3.0.0 + resolution: "@metamask/network-controller@npm:3.0.0" + dependencies: + "@metamask/base-controller": ^1.1.2 + "@metamask/controller-utils": ^2.0.0 + async-mutex: ^0.2.6 + babel-runtime: ^6.26.0 + eth-json-rpc-infura: ^5.1.0 + eth-query: ^2.1.2 + immer: ^9.0.6 + web3-provider-engine: ^16.0.3 + checksum: 3ae56a252c11dbd6dc843f9db8b30768d2475afd499c99bdccdc850517031b447bab9ca4f6647da7e64c7a0efd61d029f59a89e4ec702e34a99733dd8e7f93ff + languageName: node + linkType: hard + "@metamask/network-controller@npm:^4.0.0": version: 4.0.0 resolution: "@metamask/network-controller@npm:4.0.0" @@ -4090,22 +4108,6 @@ __metadata: languageName: node linkType: hard -"@metamask/network-controller@npm:~1.0.0": - version: 1.0.0 - resolution: "@metamask/network-controller@npm:1.0.0" - dependencies: - "@metamask/base-controller": ~1.0.0 - "@metamask/controller-utils": ~1.0.0 - async-mutex: ^0.2.6 - babel-runtime: ^6.26.0 - eth-json-rpc-infura: ^5.1.0 - eth-query: ^2.1.2 - immer: ^9.0.6 - web3-provider-engine: ^16.0.3 - checksum: a138943fecc27630e6fe392b9d237405e61b55e17b9dcfc7c434ccc59582fc775aec54e765c2e98f2b1579f760c7d163156450184172128079ce3c4d8e4bc725 - languageName: node - linkType: hard - "@metamask/notification-controller@npm:^1.0.0": version: 1.0.0 resolution: "@metamask/notification-controller@npm:1.0.0" @@ -24299,7 +24301,7 @@ __metadata: "@metamask/eth-token-tracker": ^4.0.0 "@metamask/etherscan-link": ^2.2.0 "@metamask/forwarder": ^1.1.0 - "@metamask/gas-fee-controller": ^1.0.0 + "@metamask/gas-fee-controller": ^3.0.0 "@metamask/jazzicon": ^2.0.0 "@metamask/key-tree": ^7.0.0 "@metamask/logo": ^3.1.1