diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 55888558c6d6..39e34955cac2 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -4146,8 +4146,7 @@ export default class MetamaskController extends EventEmitter { ), // GasFeeController - gasFeeStartPollingByNetworkClientId: - gasFeeController.startPollingByNetworkClientId.bind(gasFeeController), + gasFeeStartPolling: gasFeeController.startPolling.bind(gasFeeController), gasFeeStopPollingByPollingToken: gasFeeController.stopPollingByPollingToken.bind(gasFeeController), diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 93308bf0af4a..cf72074493e6 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1439,14 +1439,6 @@ "uuid": true } }, - "@metamask/gas-fee-controller>@metamask/base-controller": { - "globals": { - "setTimeout": true - }, - "packages": { - "immer": true - } - }, "@metamask/gas-fee-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -1454,7 +1446,7 @@ "setTimeout": true }, "packages": { - "@metamask/gas-fee-controller>@metamask/base-controller": true, + "@metamask/base-controller": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, "uuid": true } @@ -2637,13 +2629,13 @@ "@ethersproject/providers": true, "@metamask/controller-utils": true, "@metamask/eth-query": true, - "@metamask/gas-fee-controller": true, "@metamask/metamask-eth-abis": true, "@metamask/name-controller>async-mutex": true, "@metamask/network-controller": true, "@metamask/smart-transactions-controller>@metamask/base-controller": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@ethereumjs/tx": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@ethereumjs/util": true, + "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/gas-fee-controller": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/nonce-tracker": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/rpc-errors": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/utils": true, @@ -2684,6 +2676,20 @@ "webpack>events": true } }, + "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/gas-fee-controller": { + "globals": { + "clearInterval": true, + "console.error": true, + "setInterval": true + }, + "packages": { + "@metamask/controller-utils": true, + "@metamask/eth-query": true, + "@metamask/smart-transactions-controller>@metamask/polling-controller": true, + "bn.js": true, + "uuid": true + } + }, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/nonce-tracker": { "packages": { "@ethersproject/providers": true, @@ -3023,29 +3029,21 @@ "fetch": true }, "packages": { + "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/eth-query": true, "@metamask/gas-fee-controller": true, + "@metamask/rpc-errors": true, "@metamask/transaction-controller": true, - "@metamask/user-operation-controller>@metamask/base-controller": true, "@metamask/user-operation-controller>@metamask/polling-controller": true, - "@metamask/user-operation-controller>@metamask/rpc-errors": true, "@metamask/user-operation-controller>@metamask/utils": true, + "@metamask/utils>@metamask/superstruct": true, "bn.js": true, "lodash": true, - "superstruct": true, "uuid": true, "webpack>events": true } }, - "@metamask/user-operation-controller>@metamask/base-controller": { - "globals": { - "setTimeout": true - }, - "packages": { - "immer": true - } - }, "@metamask/user-operation-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -3053,32 +3051,11 @@ "setTimeout": true }, "packages": { + "@metamask/base-controller": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/user-operation-controller>@metamask/base-controller": true, "uuid": true } }, - "@metamask/user-operation-controller>@metamask/rpc-errors": { - "packages": { - "@metamask/rpc-errors>fast-safe-stringify": true, - "@metamask/user-operation-controller>@metamask/rpc-errors>@metamask/utils": true - } - }, - "@metamask/user-operation-controller>@metamask/rpc-errors>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/user-operation-controller>@metamask/utils": { "globals": { "TextDecoder": true, @@ -5668,12 +5645,6 @@ "string.prototype.matchall>get-intrinsic": true } }, - "superstruct": { - "globals": { - "console.warn": true, - "define": true - } - }, "terser>source-map-support>buffer-from": { "packages": { "browserify>buffer": true diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 93308bf0af4a..cf72074493e6 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -1439,14 +1439,6 @@ "uuid": true } }, - "@metamask/gas-fee-controller>@metamask/base-controller": { - "globals": { - "setTimeout": true - }, - "packages": { - "immer": true - } - }, "@metamask/gas-fee-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -1454,7 +1446,7 @@ "setTimeout": true }, "packages": { - "@metamask/gas-fee-controller>@metamask/base-controller": true, + "@metamask/base-controller": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, "uuid": true } @@ -2637,13 +2629,13 @@ "@ethersproject/providers": true, "@metamask/controller-utils": true, "@metamask/eth-query": true, - "@metamask/gas-fee-controller": true, "@metamask/metamask-eth-abis": true, "@metamask/name-controller>async-mutex": true, "@metamask/network-controller": true, "@metamask/smart-transactions-controller>@metamask/base-controller": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@ethereumjs/tx": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@ethereumjs/util": true, + "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/gas-fee-controller": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/nonce-tracker": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/rpc-errors": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/utils": true, @@ -2684,6 +2676,20 @@ "webpack>events": true } }, + "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/gas-fee-controller": { + "globals": { + "clearInterval": true, + "console.error": true, + "setInterval": true + }, + "packages": { + "@metamask/controller-utils": true, + "@metamask/eth-query": true, + "@metamask/smart-transactions-controller>@metamask/polling-controller": true, + "bn.js": true, + "uuid": true + } + }, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/nonce-tracker": { "packages": { "@ethersproject/providers": true, @@ -3023,29 +3029,21 @@ "fetch": true }, "packages": { + "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/eth-query": true, "@metamask/gas-fee-controller": true, + "@metamask/rpc-errors": true, "@metamask/transaction-controller": true, - "@metamask/user-operation-controller>@metamask/base-controller": true, "@metamask/user-operation-controller>@metamask/polling-controller": true, - "@metamask/user-operation-controller>@metamask/rpc-errors": true, "@metamask/user-operation-controller>@metamask/utils": true, + "@metamask/utils>@metamask/superstruct": true, "bn.js": true, "lodash": true, - "superstruct": true, "uuid": true, "webpack>events": true } }, - "@metamask/user-operation-controller>@metamask/base-controller": { - "globals": { - "setTimeout": true - }, - "packages": { - "immer": true - } - }, "@metamask/user-operation-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -3053,32 +3051,11 @@ "setTimeout": true }, "packages": { + "@metamask/base-controller": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/user-operation-controller>@metamask/base-controller": true, "uuid": true } }, - "@metamask/user-operation-controller>@metamask/rpc-errors": { - "packages": { - "@metamask/rpc-errors>fast-safe-stringify": true, - "@metamask/user-operation-controller>@metamask/rpc-errors>@metamask/utils": true - } - }, - "@metamask/user-operation-controller>@metamask/rpc-errors>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/user-operation-controller>@metamask/utils": { "globals": { "TextDecoder": true, @@ -5668,12 +5645,6 @@ "string.prototype.matchall>get-intrinsic": true } }, - "superstruct": { - "globals": { - "console.warn": true, - "define": true - } - }, "terser>source-map-support>buffer-from": { "packages": { "browserify>buffer": true diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 93308bf0af4a..cf72074493e6 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1439,14 +1439,6 @@ "uuid": true } }, - "@metamask/gas-fee-controller>@metamask/base-controller": { - "globals": { - "setTimeout": true - }, - "packages": { - "immer": true - } - }, "@metamask/gas-fee-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -1454,7 +1446,7 @@ "setTimeout": true }, "packages": { - "@metamask/gas-fee-controller>@metamask/base-controller": true, + "@metamask/base-controller": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, "uuid": true } @@ -2637,13 +2629,13 @@ "@ethersproject/providers": true, "@metamask/controller-utils": true, "@metamask/eth-query": true, - "@metamask/gas-fee-controller": true, "@metamask/metamask-eth-abis": true, "@metamask/name-controller>async-mutex": true, "@metamask/network-controller": true, "@metamask/smart-transactions-controller>@metamask/base-controller": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@ethereumjs/tx": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@ethereumjs/util": true, + "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/gas-fee-controller": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/nonce-tracker": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/rpc-errors": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/utils": true, @@ -2684,6 +2676,20 @@ "webpack>events": true } }, + "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/gas-fee-controller": { + "globals": { + "clearInterval": true, + "console.error": true, + "setInterval": true + }, + "packages": { + "@metamask/controller-utils": true, + "@metamask/eth-query": true, + "@metamask/smart-transactions-controller>@metamask/polling-controller": true, + "bn.js": true, + "uuid": true + } + }, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/nonce-tracker": { "packages": { "@ethersproject/providers": true, @@ -3023,29 +3029,21 @@ "fetch": true }, "packages": { + "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/eth-query": true, "@metamask/gas-fee-controller": true, + "@metamask/rpc-errors": true, "@metamask/transaction-controller": true, - "@metamask/user-operation-controller>@metamask/base-controller": true, "@metamask/user-operation-controller>@metamask/polling-controller": true, - "@metamask/user-operation-controller>@metamask/rpc-errors": true, "@metamask/user-operation-controller>@metamask/utils": true, + "@metamask/utils>@metamask/superstruct": true, "bn.js": true, "lodash": true, - "superstruct": true, "uuid": true, "webpack>events": true } }, - "@metamask/user-operation-controller>@metamask/base-controller": { - "globals": { - "setTimeout": true - }, - "packages": { - "immer": true - } - }, "@metamask/user-operation-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -3053,32 +3051,11 @@ "setTimeout": true }, "packages": { + "@metamask/base-controller": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/user-operation-controller>@metamask/base-controller": true, "uuid": true } }, - "@metamask/user-operation-controller>@metamask/rpc-errors": { - "packages": { - "@metamask/rpc-errors>fast-safe-stringify": true, - "@metamask/user-operation-controller>@metamask/rpc-errors>@metamask/utils": true - } - }, - "@metamask/user-operation-controller>@metamask/rpc-errors>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/user-operation-controller>@metamask/utils": { "globals": { "TextDecoder": true, @@ -5668,12 +5645,6 @@ "string.prototype.matchall>get-intrinsic": true } }, - "superstruct": { - "globals": { - "console.warn": true, - "define": true - } - }, "terser>source-map-support>buffer-from": { "packages": { "browserify>buffer": true diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index b135a959d359..e70102a63e51 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -1531,14 +1531,6 @@ "uuid": true } }, - "@metamask/gas-fee-controller>@metamask/base-controller": { - "globals": { - "setTimeout": true - }, - "packages": { - "immer": true - } - }, "@metamask/gas-fee-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -1546,7 +1538,7 @@ "setTimeout": true }, "packages": { - "@metamask/gas-fee-controller>@metamask/base-controller": true, + "@metamask/base-controller": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, "uuid": true } @@ -2729,13 +2721,13 @@ "@ethersproject/providers": true, "@metamask/controller-utils": true, "@metamask/eth-query": true, - "@metamask/gas-fee-controller": true, "@metamask/metamask-eth-abis": true, "@metamask/name-controller>async-mutex": true, "@metamask/network-controller": true, "@metamask/smart-transactions-controller>@metamask/base-controller": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@ethereumjs/tx": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@ethereumjs/util": true, + "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/gas-fee-controller": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/nonce-tracker": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/rpc-errors": true, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/utils": true, @@ -2776,6 +2768,20 @@ "webpack>events": true } }, + "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/gas-fee-controller": { + "globals": { + "clearInterval": true, + "console.error": true, + "setInterval": true + }, + "packages": { + "@metamask/controller-utils": true, + "@metamask/eth-query": true, + "@metamask/smart-transactions-controller>@metamask/polling-controller": true, + "bn.js": true, + "uuid": true + } + }, "@metamask/smart-transactions-controller>@metamask/transaction-controller>@metamask/nonce-tracker": { "packages": { "@ethersproject/providers": true, @@ -3115,29 +3121,21 @@ "fetch": true }, "packages": { + "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/eth-query": true, "@metamask/gas-fee-controller": true, + "@metamask/rpc-errors": true, "@metamask/transaction-controller": true, - "@metamask/user-operation-controller>@metamask/base-controller": true, "@metamask/user-operation-controller>@metamask/polling-controller": true, - "@metamask/user-operation-controller>@metamask/rpc-errors": true, "@metamask/user-operation-controller>@metamask/utils": true, + "@metamask/utils>@metamask/superstruct": true, "bn.js": true, "lodash": true, - "superstruct": true, "uuid": true, "webpack>events": true } }, - "@metamask/user-operation-controller>@metamask/base-controller": { - "globals": { - "setTimeout": true - }, - "packages": { - "immer": true - } - }, "@metamask/user-operation-controller>@metamask/polling-controller": { "globals": { "clearTimeout": true, @@ -3145,32 +3143,11 @@ "setTimeout": true }, "packages": { + "@metamask/base-controller": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/user-operation-controller>@metamask/base-controller": true, "uuid": true } }, - "@metamask/user-operation-controller>@metamask/rpc-errors": { - "packages": { - "@metamask/rpc-errors>fast-safe-stringify": true, - "@metamask/user-operation-controller>@metamask/rpc-errors>@metamask/utils": true - } - }, - "@metamask/user-operation-controller>@metamask/rpc-errors>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/user-operation-controller>@metamask/utils": { "globals": { "TextDecoder": true, @@ -5736,12 +5713,6 @@ "string.prototype.matchall>get-intrinsic": true } }, - "superstruct": { - "globals": { - "console.warn": true, - "define": true - } - }, "terser>source-map-support>buffer-from": { "packages": { "browserify>buffer": true diff --git a/package.json b/package.json index df700ec1b415..5304df2c2ff8 100644 --- a/package.json +++ b/package.json @@ -241,7 +241,6 @@ "@expo/config-plugins/glob": "^10.3.10", "@solana/web3.js/rpc-websockets": "^8.0.1", "@metamask/message-manager": "^10.1.0", - "@metamask/gas-fee-controller@npm:^15.1.1": "patch:@metamask/gas-fee-controller@npm%3A15.1.2#~/.yarn/patches/@metamask-gas-fee-controller-npm-15.1.2-db4d2976aa.patch", "@metamask/nonce-tracker@npm:^5.0.0": "patch:@metamask/nonce-tracker@npm%3A5.0.0#~/.yarn/patches/@metamask-nonce-tracker-npm-5.0.0-d81478218e.patch", "@metamask/network-controller@npm:^17.0.0": "patch:@metamask/network-controller@npm%3A21.0.0#~/.yarn/patches/@metamask-network-controller-npm-21.0.0-559aa8e395.patch", "@metamask/network-controller@npm:^19.0.0": "patch:@metamask/network-controller@npm%3A21.0.0#~/.yarn/patches/@metamask-network-controller-npm-21.0.0-559aa8e395.patch", @@ -310,7 +309,7 @@ "@metamask/ethjs": "^0.6.0", "@metamask/ethjs-contract": "^0.4.1", "@metamask/ethjs-query": "^0.7.1", - "@metamask/gas-fee-controller": "^18.0.0", + "@metamask/gas-fee-controller": "^21.0.0", "@metamask/jazzicon": "^2.0.0", "@metamask/json-rpc-engine": "^10.0.0", "@metamask/json-rpc-middleware-stream": "^8.0.4", @@ -351,7 +350,7 @@ "@metamask/snaps-utils": "^8.6.0", "@metamask/solana-wallet-snap": "^0.1.9", "@metamask/transaction-controller": "^40.1.0", - "@metamask/user-operation-controller": "^13.0.0", + "@metamask/user-operation-controller": "^16.0.0", "@metamask/utils": "^10.0.1", "@ngraveio/bc-ur": "^1.1.12", "@noble/hashes": "^1.3.3", diff --git a/ui/pages/bridge/index.test.tsx b/ui/pages/bridge/index.test.tsx index 7d5f813513c5..1dc898d71685 100644 --- a/ui/pages/bridge/index.test.tsx +++ b/ui/pages/bridge/index.test.tsx @@ -16,9 +16,7 @@ setBackgroundConnection({ setSwapsLiveness: jest.fn(() => true), setSwapsTokens: jest.fn(), setSwapsTxGasPrice: jest.fn(), - gasFeeStartPollingByNetworkClientId: jest - .fn() - .mockResolvedValue('pollingToken'), + gasFeeStartPolling: jest.fn().mockResolvedValue('pollingToken'), gasFeeStopPollingByPollingToken: jest.fn(), getNetworkConfigurationByNetworkClientId: jest .fn() diff --git a/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.test.js b/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.test.js index 04caf63d12e0..e30dd925c4d3 100644 --- a/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.test.js +++ b/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.test.js @@ -10,9 +10,7 @@ import ConfirmSendEther from './confirm-send-ether'; jest.mock('../components/simulation-details/useSimulationMetrics'); setBackgroundConnection({ - gasFeeStartPollingByNetworkClientId: jest - .fn() - .mockResolvedValue('pollingToken'), + gasFeeStartPolling: jest.fn().mockResolvedValue('pollingToken'), gasFeeStopPollingByPollingToken: jest.fn(), getNetworkConfigurationByNetworkClientId: jest.fn().mockImplementation(() => Promise.resolve({ diff --git a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js index 5a846874fed3..56be8fd5aee3 100644 --- a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js +++ b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js @@ -31,9 +31,7 @@ jest.mock('../components/simulation-details/useSimulationMetrics'); const middleware = [thunk]; setBackgroundConnection({ - gasFeeStartPollingByNetworkClientId: jest - .fn() - .mockResolvedValue('pollingToken'), + gasFeeStartPolling: jest.fn().mockResolvedValue('pollingToken'), gasFeeStopPollingByPollingToken: jest.fn(), getNetworkConfigurationByNetworkClientId: jest.fn().mockImplementation(() => Promise.resolve({ diff --git a/ui/pages/confirmations/confirm-transaction/confirm-transaction.transaction.test.js b/ui/pages/confirmations/confirm-transaction/confirm-transaction.transaction.test.js index 09eb13c16919..a7db429a90e8 100644 --- a/ui/pages/confirmations/confirm-transaction/confirm-transaction.transaction.test.js +++ b/ui/pages/confirmations/confirm-transaction/confirm-transaction.transaction.test.js @@ -19,7 +19,7 @@ const middleware = [thunk]; setBackgroundConnection({ getGasFeeTimeEstimate: jest.fn(), - gasFeeStartPollingByNetworkClientId: jest.fn(), + gasFeeStartPolling: jest.fn(), gasFeeStopPollingByPollingToken: jest.fn(), promisifiedBackground: jest.fn(), tryReverseResolveAddress: jest.fn(), diff --git a/ui/pages/swaps/index.test.js b/ui/pages/swaps/index.test.js index 4157b614562f..e9e16d91b208 100644 --- a/ui/pages/swaps/index.test.js +++ b/ui/pages/swaps/index.test.js @@ -33,9 +33,7 @@ setBackgroundConnection({ setSwapsLiveness: jest.fn(() => true), setSwapsTokens: jest.fn(), setSwapsTxGasPrice: jest.fn(), - gasFeeStartPollingByNetworkClientId: jest - .fn() - .mockResolvedValue('pollingToken'), + gasFeeStartPolling: jest.fn().mockResolvedValue('pollingToken'), gasFeeStopPollingByPollingToken: jest.fn(), getNetworkConfigurationByNetworkClientId: jest .fn() diff --git a/ui/store/actions.ts b/ui/store/actions.ts index f3f4e712acf5..90018c4d7389 100644 --- a/ui/store/actions.ts +++ b/ui/store/actions.ts @@ -4728,10 +4728,9 @@ export async function accountTrackerStopPollingByPollingToken( export async function gasFeeStartPollingByNetworkClientId( networkClientId: string, ) { - const pollingToken = await submitRequestToBackground( - 'gasFeeStartPollingByNetworkClientId', - [networkClientId], - ); + const pollingToken = await submitRequestToBackground('gasFeeStartPolling', [ + { networkClientId }, + ]); await addPollingTokenToAppState(pollingToken); return pollingToken; } diff --git a/yarn.lock b/yarn.lock index 1f5433e3d780..88e84e6d37b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5695,6 +5695,26 @@ __metadata: languageName: node linkType: hard +"@metamask/gas-fee-controller@npm:^21.0.0": + version: 21.0.0 + resolution: "@metamask/gas-fee-controller@npm:21.0.0" + dependencies: + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/eth-query": "npm:^4.0.0" + "@metamask/ethjs-unit": "npm:^0.3.0" + "@metamask/polling-controller": "npm:^11.0.0" + "@metamask/utils": "npm:^9.1.0" + "@types/bn.js": "npm:^5.1.5" + "@types/uuid": "npm:^8.3.0" + bn.js: "npm:^5.2.1" + uuid: "npm:^8.3.2" + peerDependencies: + "@metamask/network-controller": ^21.0.0 + checksum: 10/8b41c7257f7dc17deb3f550cfdde0288da142d11536bb55c998bec8267fa62243e36fb6468a44224cd90ed2f49ba3ba1dbe93c2b0834a725752c5a66ae283303 + languageName: node + linkType: hard + "@metamask/jazzicon@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/jazzicon@npm:2.0.0" @@ -6183,6 +6203,22 @@ __metadata: languageName: node linkType: hard +"@metamask/polling-controller@npm:^11.0.0": + version: 11.0.0 + resolution: "@metamask/polling-controller@npm:11.0.0" + dependencies: + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/utils": "npm:^9.1.0" + "@types/uuid": "npm:^8.3.0" + fast-json-stable-stringify: "npm:^2.1.0" + uuid: "npm:^8.3.2" + peerDependencies: + "@metamask/network-controller": ^21.0.0 + checksum: 10/67b563a5d1ce02dc9c2db25ad4ad1fb9f75d5578cf380cce85176ff2cd136addce612c3982653254647b9d8c535374e93d96abb6e500e42076bf3a524a72e75f + languageName: node + linkType: hard + "@metamask/polling-controller@npm:^12.0.1": version: 12.0.1 resolution: "@metamask/polling-controller@npm:12.0.1" @@ -6752,33 +6788,28 @@ __metadata: languageName: node linkType: hard -"@metamask/user-operation-controller@npm:^13.0.0": - version: 13.0.0 - resolution: "@metamask/user-operation-controller@npm:13.0.0" +"@metamask/user-operation-controller@npm:^16.0.0": + version: 16.0.0 + resolution: "@metamask/user-operation-controller@npm:16.0.0" dependencies: - "@metamask/approval-controller": "npm:^7.0.0" - "@metamask/base-controller": "npm:^6.0.0" - "@metamask/controller-utils": "npm:^11.0.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" "@metamask/eth-query": "npm:^4.0.0" - "@metamask/gas-fee-controller": "npm:^18.0.0" - "@metamask/keyring-controller": "npm:^17.1.0" - "@metamask/network-controller": "npm:^19.0.0" - "@metamask/polling-controller": "npm:^8.0.0" - "@metamask/rpc-errors": "npm:^6.2.1" - "@metamask/transaction-controller": "npm:^34.0.0" - "@metamask/utils": "npm:^8.3.0" + "@metamask/polling-controller": "npm:^11.0.0" + "@metamask/rpc-errors": "npm:^7.0.0" + "@metamask/superstruct": "npm:^3.1.0" + "@metamask/utils": "npm:^9.1.0" bn.js: "npm:^5.2.1" immer: "npm:^9.0.6" lodash: "npm:^4.17.21" - superstruct: "npm:^1.0.3" uuid: "npm:^8.3.2" peerDependencies: "@metamask/approval-controller": ^7.0.0 - "@metamask/gas-fee-controller": ^18.0.0 + "@metamask/gas-fee-controller": ^21.0.0 "@metamask/keyring-controller": ^17.0.0 - "@metamask/network-controller": ^19.0.0 - "@metamask/transaction-controller": ^34.0.0 - checksum: 10/600dd845dfc30ff852d766bd012ce40b4a6fb2276538d358cbe3ef1ce5815e4dba8f94e4911b7cb0506857133b185923b43af73ec39c7628eb86eedfdaf8dc59 + "@metamask/network-controller": ^21.0.0 + "@metamask/transaction-controller": ^37.0.0 + checksum: 10/36ef43910f9e94ae7823902113acdaf7d4031423930f0a35fe4dd3b948a00e8088ea590354afbdb507b32712761720727f0ee905ad6d3db83ef3f0f145b8452d languageName: node linkType: hard @@ -26828,7 +26859,7 @@ __metadata: "@metamask/ethjs-contract": "npm:^0.4.1" "@metamask/ethjs-query": "npm:^0.7.1" "@metamask/forwarder": "npm:^1.1.0" - "@metamask/gas-fee-controller": "npm:^18.0.0" + "@metamask/gas-fee-controller": "npm:^21.0.0" "@metamask/jazzicon": "npm:^2.0.0" "@metamask/json-rpc-engine": "npm:^10.0.0" "@metamask/json-rpc-middleware-stream": "npm:^8.0.4" @@ -26873,7 +26904,7 @@ __metadata: "@metamask/test-bundler": "npm:^1.0.0" "@metamask/test-dapp": "npm:8.13.0" "@metamask/transaction-controller": "npm:^40.1.0" - "@metamask/user-operation-controller": "npm:^13.0.0" + "@metamask/user-operation-controller": "npm:^16.0.0" "@metamask/utils": "npm:^10.0.1" "@ngraveio/bc-ur": "npm:^1.1.12" "@noble/hashes": "npm:^1.3.3"