From d5313dd5ba2a6e831bc9a2d7ad614421f754c188 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 13 Sep 2023 21:40:29 +0000 Subject: [PATCH 01/16] deps(network-controller): @metamask/eth-json-rpc-provider@^1.0.0->^2.1.0 --- package.json | 2 +- packages/network-controller/package.json | 2 +- yarn.lock | 17 ++++++++++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b46ea1551a..3d68fda14f 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@metamask/eslint-config-jest": "^12.1.0", "@metamask/eslint-config-nodejs": "^12.1.0", "@metamask/eslint-config-typescript": "^12.1.0", - "@metamask/eth-json-rpc-provider": "^1.0.0", + "@metamask/eth-json-rpc-provider": "^2.1.0", "@metamask/utils": "^8.1.0", "@types/node": "^16.18.54", "@typescript-eslint/eslint-plugin": "^5.62.0", diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index 7c3cce6ecb..d9492d8b8f 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -33,7 +33,7 @@ "@metamask/controller-utils": "^5.0.2", "@metamask/eth-json-rpc-infura": "^8.1.1", "@metamask/eth-json-rpc-middleware": "^11.0.2", - "@metamask/eth-json-rpc-provider": "^1.0.0", + "@metamask/eth-json-rpc-provider": "^2.1.0", "@metamask/eth-query": "^3.0.1", "@metamask/swappable-obj-proxy": "^2.1.0", "@metamask/utils": "^8.1.0", diff --git a/yarn.lock b/yarn.lock index 658b9bde47..5342274dbe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1539,7 +1539,7 @@ __metadata: "@metamask/eslint-config-jest": ^12.1.0 "@metamask/eslint-config-nodejs": ^12.1.0 "@metamask/eslint-config-typescript": ^12.1.0 - "@metamask/eth-json-rpc-provider": ^1.0.0 + "@metamask/eth-json-rpc-provider": ^2.1.0 "@metamask/utils": ^8.1.0 "@types/node": ^16.18.54 "@typescript-eslint/eslint-plugin": ^5.62.0 @@ -1713,6 +1713,17 @@ __metadata: languageName: node linkType: hard +"@metamask/eth-json-rpc-provider@npm:^2.1.0": + version: 2.2.0 + resolution: "@metamask/eth-json-rpc-provider@npm:2.2.0" + dependencies: + "@metamask/json-rpc-engine": ^7.1.0 + "@metamask/safe-event-emitter": ^3.0.0 + "@metamask/utils": ^8.1.0 + checksum: da725fa51e8bfe0b904520b8223aed209fc54605edf1ab5ae6091a460694fd4aad5046f3ae88e8df3741079507dc0e6f2e2c85f1feee8a98506c4f550ea07549 + languageName: node + linkType: hard + "@metamask/eth-keyring-controller@npm:^13.0.1": version: 13.0.1 resolution: "@metamask/eth-keyring-controller@npm:13.0.1" @@ -1841,7 +1852,7 @@ __metadata: languageName: unknown linkType: soft -"@metamask/json-rpc-engine@npm:^7.1.1": +"@metamask/json-rpc-engine@npm:^7.1.0, @metamask/json-rpc-engine@npm:^7.1.1": version: 7.1.1 resolution: "@metamask/json-rpc-engine@npm:7.1.1" dependencies: @@ -2007,7 +2018,7 @@ __metadata: "@metamask/controller-utils": ^5.0.2 "@metamask/eth-json-rpc-infura": ^8.1.1 "@metamask/eth-json-rpc-middleware": ^11.0.2 - "@metamask/eth-json-rpc-provider": ^1.0.0 + "@metamask/eth-json-rpc-provider": ^2.1.0 "@metamask/eth-query": ^3.0.1 "@metamask/swappable-obj-proxy": ^2.1.0 "@metamask/utils": ^8.1.0 From 1de002e7f8729aed9e77e880734e6d20a9a148bc Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 20 Sep 2023 10:58:46 +0000 Subject: [PATCH 02/16] deps: eth-rpc-errors -> @metamask/rpc-errors - network-controller - rate-limit-controller - signature-controller --- packages/network-controller/package.json | 2 +- .../src/NetworkController.ts | 2 +- .../tests/NetworkController.test.ts | 20 +++++++++---------- packages/rate-limit-controller/package.json | 2 +- .../src/RateLimitController.ts | 4 ++-- packages/signature-controller/package.json | 2 +- .../src/SignatureController.test.ts | 2 +- .../src/SignatureController.ts | 12 ++++------- yarn.lock | 6 +++--- 9 files changed, 24 insertions(+), 28 deletions(-) diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index d9492d8b8f..c19747bc15 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -35,11 +35,11 @@ "@metamask/eth-json-rpc-middleware": "^11.0.2", "@metamask/eth-json-rpc-provider": "^2.1.0", "@metamask/eth-query": "^3.0.1", + "@metamask/rpc-errors": "^6.0.0", "@metamask/swappable-obj-proxy": "^2.1.0", "@metamask/utils": "^8.1.0", "async-mutex": "^0.2.6", "eth-block-tracker": "^7.0.1", - "eth-rpc-errors": "^4.0.2", "immer": "^9.0.6", "json-rpc-engine": "^6.1.0", "uuid": "^8.3.2" diff --git a/packages/network-controller/src/NetworkController.ts b/packages/network-controller/src/NetworkController.ts index 67cfcce839..e4795edaf5 100644 --- a/packages/network-controller/src/NetworkController.ts +++ b/packages/network-controller/src/NetworkController.ts @@ -9,6 +9,7 @@ import { isSafeChainId, } from '@metamask/controller-utils'; import EthQuery from '@metamask/eth-query'; +import { errorCodes } from '@metamask/rpc-errors'; import { createEventEmitterProxy } from '@metamask/swappable-obj-proxy'; import type { SwappableProxy } from '@metamask/swappable-obj-proxy'; import type { Hex } from '@metamask/utils'; @@ -18,7 +19,6 @@ import { isPlainObject, } from '@metamask/utils'; import { strict as assert } from 'assert'; -import { errorCodes } from 'eth-rpc-errors'; import type { Patch } from 'immer'; import { v4 as random } from 'uuid'; diff --git a/packages/network-controller/tests/NetworkController.test.ts b/packages/network-controller/tests/NetworkController.test.ts index dfb583938d..a0da019abb 100644 --- a/packages/network-controller/tests/NetworkController.test.ts +++ b/packages/network-controller/tests/NetworkController.test.ts @@ -7,8 +7,8 @@ import { NetworkType, toHex, } from '@metamask/controller-utils'; +import { rpcErrors } from '@metamask/rpc-errors'; import assert from 'assert'; -import { ethErrors } from 'eth-rpc-errors'; import type { Patch } from 'immer'; import { when, resetAllWhenMocks } from 'jest-when'; import { inspect, isDeepStrictEqual, promisify } from 'util'; @@ -128,7 +128,7 @@ const SUCCESSFUL_ETH_GET_BLOCK_BY_NUMBER_RESPONSE = { /** * A response object for a request that has been geoblocked by Infura. */ -const BLOCKED_INFURA_JSON_RPC_ERROR = ethErrors.rpc.internal( +const BLOCKED_INFURA_JSON_RPC_ERROR = rpcErrors.internal( JSON.stringify({ error: 'countryBlocked' }), ); @@ -136,7 +136,7 @@ const BLOCKED_INFURA_JSON_RPC_ERROR = ethErrors.rpc.internal( * A response object for a unsuccessful request to any RPC method. It is assumed * that the error here is insignificant to the test. */ -const GENERIC_JSON_RPC_ERROR = ethErrors.rpc.internal( +const GENERIC_JSON_RPC_ERROR = rpcErrors.internal( JSON.stringify({ error: 'oops' }), ); @@ -5106,7 +5106,7 @@ describe('NetworkController', () => { request: { method: 'eth_getBlockByNumber', }, - error: ethErrors.rpc.methodNotFound(), + error: rpcErrors.methodNotFound(), }, ]), buildFakeProvider([ @@ -5622,7 +5622,7 @@ describe('NetworkController', () => { request: { method: 'eth_getBlockByNumber', }, - error: ethErrors.rpc.methodNotFound(), + error: rpcErrors.methodNotFound(), }, ]), buildFakeProvider([ @@ -6250,7 +6250,7 @@ function lookupNetworkTests({ method: 'eth_getBlockByNumber', params: ['latest', false], }, - error: ethErrors.rpc.limitExceeded('some error'), + error: rpcErrors.limitExceeded('some error'), }, ], stubLookupNetworkWhileSetting: true, @@ -6291,7 +6291,7 @@ function lookupNetworkTests({ method: 'eth_getBlockByNumber', params: ['latest', false], }, - error: ethErrors.rpc.limitExceeded('some error'), + error: rpcErrors.limitExceeded('some error'), }, ], }); @@ -6326,7 +6326,7 @@ function lookupNetworkTests({ method: 'eth_getBlockByNumber', params: ['latest', false], }, - error: ethErrors.rpc.limitExceeded('some error'), + error: rpcErrors.limitExceeded('some error'), }, ], stubLookupNetworkWhileSetting: true, @@ -6358,7 +6358,7 @@ function lookupNetworkTests({ method: 'eth_getBlockByNumber', params: ['latest', false], }, - error: ethErrors.rpc.limitExceeded('some error'), + error: rpcErrors.limitExceeded('some error'), }, ], stubLookupNetworkWhileSetting: true, @@ -6392,7 +6392,7 @@ function lookupNetworkTests({ method: 'eth_getBlockByNumber', params: ['latest', false], }, - error: ethErrors.rpc.limitExceeded('some error'), + error: rpcErrors.limitExceeded('some error'), }, ], stubLookupNetworkWhileSetting: true, diff --git a/packages/rate-limit-controller/package.json b/packages/rate-limit-controller/package.json index d7f8a44ce4..e2e8ebc7a0 100644 --- a/packages/rate-limit-controller/package.json +++ b/packages/rate-limit-controller/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "@metamask/base-controller": "^3.2.3", - "eth-rpc-errors": "^4.0.2", + "@metamask/rpc-errors": "^6.0.0", "immer": "^9.0.6" }, "devDependencies": { diff --git a/packages/rate-limit-controller/src/RateLimitController.ts b/packages/rate-limit-controller/src/RateLimitController.ts index b3372d382a..83526e6dd9 100644 --- a/packages/rate-limit-controller/src/RateLimitController.ts +++ b/packages/rate-limit-controller/src/RateLimitController.ts @@ -1,6 +1,6 @@ import type { RestrictedControllerMessenger } from '@metamask/base-controller'; import { BaseControllerV2 as BaseController } from '@metamask/base-controller'; -import { ethErrors } from 'eth-rpc-errors'; +import { rpcErrors } from '@metamask/rpc-errors'; import type { Patch } from 'immer'; /** @@ -143,7 +143,7 @@ export class RateLimitController< ...args: Parameters ): Promise> { if (this.isRateLimited(type, origin)) { - throw ethErrors.rpc.limitExceeded({ + throw rpcErrors.limitExceeded({ message: `"${type.toString()}" is currently rate-limited. Please try again later.`, }); } diff --git a/packages/signature-controller/package.json b/packages/signature-controller/package.json index d280f5fb45..3e1005bdbb 100644 --- a/packages/signature-controller/package.json +++ b/packages/signature-controller/package.json @@ -34,8 +34,8 @@ "@metamask/controller-utils": "^5.0.2", "@metamask/logging-controller": "^1.0.3", "@metamask/message-manager": "^7.3.5", + "@metamask/rpc-errors": "^6.0.0", "@metamask/utils": "^8.1.0", - "eth-rpc-errors": "^4.0.2", "ethereumjs-util": "^7.0.10", "immer": "^9.0.6", "lodash": "^4.17.21" diff --git a/packages/signature-controller/src/SignatureController.test.ts b/packages/signature-controller/src/SignatureController.test.ts index 78408fafa5..4931f368b2 100644 --- a/packages/signature-controller/src/SignatureController.test.ts +++ b/packages/signature-controller/src/SignatureController.test.ts @@ -13,7 +13,7 @@ import { PersonalMessageManager, TypedMessageManager, } from '@metamask/message-manager'; -import { EthereumProviderError } from 'eth-rpc-errors'; +import { EthereumProviderError } from '@metamask/rpc-errors'; import type { SignatureControllerMessenger, diff --git a/packages/signature-controller/src/SignatureController.ts b/packages/signature-controller/src/SignatureController.ts index 768100d57c..332c2ca7ee 100644 --- a/packages/signature-controller/src/SignatureController.ts +++ b/packages/signature-controller/src/SignatureController.ts @@ -40,8 +40,8 @@ import { PersonalMessageManager, TypedMessageManager, } from '@metamask/message-manager'; +import { providerErrors, rpcErrors } from '@metamask/rpc-errors'; import type { Hex, Json } from '@metamask/utils'; -import { ethErrors } from 'eth-rpc-errors'; import { bufferToHex } from 'ethereumjs-util'; import EventEmitter from 'events'; import type { Patch } from 'immer'; @@ -435,7 +435,7 @@ export class SignatureController extends BaseControllerV2< #validateUnsignedMessage(messageParams: MessageParamsMetamask): void { if (!this.#isEthSignEnabled()) { - throw ethErrors.rpc.methodNotFound( + throw rpcErrors.methodNotFound( 'eth_sign has been disabled. You must enable it in the advanced settings', ); } @@ -444,9 +444,7 @@ export class SignatureController extends BaseControllerV2< // This is needed because Ethereum's EcSign works only on 32 byte numbers // For 67 length see: https://github.com/MetaMask/metamask-extension/pull/12679/files#r749479607 if (data.length !== 66 && data.length !== 67) { - throw ethErrors.rpc.invalidParams( - 'eth_sign requires 32 byte message hash', - ); + throw rpcErrors.invalidParams('eth_sign requires 32 byte message hash'); } } @@ -513,9 +511,7 @@ export class SignatureController extends BaseControllerV2< ); this.#cancelAbstractMessage(messageManager, messageId); - throw ethErrors.provider.userRejectedRequest( - 'User rejected the request.', - ); + throw providerErrors.userRejectedRequest('User rejected the request.'); } await signMessage(messageParamsWithId, signingOpts); diff --git a/yarn.lock b/yarn.lock index 5342274dbe..9a175a8da9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2020,6 +2020,7 @@ __metadata: "@metamask/eth-json-rpc-middleware": ^11.0.2 "@metamask/eth-json-rpc-provider": ^2.1.0 "@metamask/eth-query": ^3.0.1 + "@metamask/rpc-errors": ^6.0.0 "@metamask/swappable-obj-proxy": ^2.1.0 "@metamask/utils": ^8.1.0 "@types/jest": ^27.4.1 @@ -2028,7 +2029,6 @@ __metadata: async-mutex: ^0.2.6 deepmerge: ^4.2.2 eth-block-tracker: ^7.0.1 - eth-rpc-errors: ^4.0.2 immer: ^9.0.6 jest: ^27.5.1 jest-when: ^3.4.2 @@ -2277,9 +2277,9 @@ __metadata: dependencies: "@metamask/auto-changelog": ^3.1.0 "@metamask/base-controller": ^3.2.3 + "@metamask/rpc-errors": ^6.0.0 "@types/jest": ^27.4.1 deepmerge: ^4.2.2 - eth-rpc-errors: ^4.0.2 immer: ^9.0.6 jest: ^27.5.1 ts-jest: ^27.1.4 @@ -2411,10 +2411,10 @@ __metadata: "@metamask/keyring-controller": ^8.0.2 "@metamask/logging-controller": ^1.0.3 "@metamask/message-manager": ^7.3.5 + "@metamask/rpc-errors": ^6.0.0 "@metamask/utils": ^8.1.0 "@types/jest": ^27.4.1 deepmerge: ^4.2.2 - eth-rpc-errors: ^4.0.2 ethereumjs-util: ^7.0.10 immer: ^9.0.6 jest: ^27.5.1 From 4ec496c322dd6ff02a4d33afc2c91f58afb0a972 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 20 Sep 2023 11:41:53 +0000 Subject: [PATCH 03/16] deps(network-controller): @metamask/eth-json-rpc-infura@^8.1.1->^9.0.0 --- packages/network-controller/package.json | 2 +- yarn.lock | 30 +++++++----------------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index c19747bc15..729369e4de 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -31,7 +31,7 @@ "dependencies": { "@metamask/base-controller": "^3.2.3", "@metamask/controller-utils": "^5.0.2", - "@metamask/eth-json-rpc-infura": "^8.1.1", + "@metamask/eth-json-rpc-infura": "^9.0.0", "@metamask/eth-json-rpc-middleware": "^11.0.2", "@metamask/eth-json-rpc-provider": "^2.1.0", "@metamask/eth-query": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index 9a175a8da9..e6faa80395 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1673,16 +1673,16 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-json-rpc-infura@npm:^8.1.1": - version: 8.1.1 - resolution: "@metamask/eth-json-rpc-infura@npm:8.1.1" +"@metamask/eth-json-rpc-infura@npm:^9.0.0": + version: 9.0.0 + resolution: "@metamask/eth-json-rpc-infura@npm:9.0.0" dependencies: - "@metamask/eth-json-rpc-provider": ^1.0.0 - "@metamask/utils": ^4.0.0 - eth-rpc-errors: ^4.0.3 - json-rpc-engine: ^6.1.0 + "@metamask/eth-json-rpc-provider": ^2.1.0 + "@metamask/json-rpc-engine": ^7.1.1 + "@metamask/rpc-errors": ^6.0.0 + "@metamask/utils": ^8.1.0 node-fetch: ^2.6.7 - checksum: ab4ce53fcc1586344824d58aed4d71412b015466f697758b4849e186038ae1730c9765935dfaf1a9131ff1a8f0f36dcb66fd50355ed95ac7a4bf0bc18c4c2696 + checksum: 3dd6783dd54a72fc479496212524150e3e3f6869a135a02709d3ef9c2d7a2e2b99690eef91776c269da3c0d79709daed0c8693549cb8dd999e5b3d96e0b106c0 languageName: node linkType: hard @@ -2016,7 +2016,7 @@ __metadata: "@metamask/auto-changelog": ^3.1.0 "@metamask/base-controller": ^3.2.3 "@metamask/controller-utils": ^5.0.2 - "@metamask/eth-json-rpc-infura": ^8.1.1 + "@metamask/eth-json-rpc-infura": ^9.0.0 "@metamask/eth-json-rpc-middleware": ^11.0.2 "@metamask/eth-json-rpc-provider": ^2.1.0 "@metamask/eth-query": ^3.0.1 @@ -2670,18 +2670,6 @@ __metadata: languageName: node linkType: hard -"@metamask/utils@npm:^4.0.0": - version: 4.0.0 - resolution: "@metamask/utils@npm:4.0.0" - dependencies: - "@types/debug": ^4.1.7 - debug: ^4.3.4 - semver: ^7.3.8 - superstruct: ^1.0.3 - checksum: 6d4edca78fe1f66504ed5e5ca021a67f4b4e0893e86484c746b87039c2161c39d3b8bd8e4b9235ddfd023b2d76dd54210af94ec5550e27bc4ad9c0d7d5f3f231 - languageName: node - linkType: hard - "@metamask/utils@npm:^5.0.0, @metamask/utils@npm:^5.0.1, @metamask/utils@npm:^5.0.2": version: 5.0.2 resolution: "@metamask/utils@npm:5.0.2" From 8861727a380cdf472c731a34d5c6d2f1da85c9d8 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 20 Sep 2023 11:45:09 +0000 Subject: [PATCH 04/16] deps(network-controller): json-rpc-engine@^6.1.0 -> @metamask/json-rpc-engine@^71.1.1 --- packages/network-controller/package.json | 2 +- packages/network-controller/src/create-network-client.ts | 4 ++-- packages/network-controller/tests/fake-provider.ts | 4 ++-- yarn.lock | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index 729369e4de..73e8b888b1 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -35,13 +35,13 @@ "@metamask/eth-json-rpc-middleware": "^11.0.2", "@metamask/eth-json-rpc-provider": "^2.1.0", "@metamask/eth-query": "^3.0.1", + "@metamask/json-rpc-engine": "^7.1.1", "@metamask/rpc-errors": "^6.0.0", "@metamask/swappable-obj-proxy": "^2.1.0", "@metamask/utils": "^8.1.0", "async-mutex": "^0.2.6", "eth-block-tracker": "^7.0.1", "immer": "^9.0.6", - "json-rpc-engine": "^6.1.0", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/network-controller/src/create-network-client.ts b/packages/network-controller/src/create-network-client.ts index 0f8ddbaf37..f1daeb7f68 100644 --- a/packages/network-controller/src/create-network-client.ts +++ b/packages/network-controller/src/create-network-client.ts @@ -22,8 +22,8 @@ import { createScaffoldMiddleware, JsonRpcEngine, mergeMiddleware, -} from 'json-rpc-engine'; -import type { JsonRpcMiddleware } from 'json-rpc-engine'; +} from '@metamask/json-rpc-engine'; +import type { JsonRpcMiddleware } from '@metamask/json-rpc-engine'; import type { BlockTracker, diff --git a/packages/network-controller/tests/fake-provider.ts b/packages/network-controller/tests/fake-provider.ts index b98352e191..3187648dee 100644 --- a/packages/network-controller/tests/fake-provider.ts +++ b/packages/network-controller/tests/fake-provider.ts @@ -1,6 +1,6 @@ import { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider/dist/safe-event-emitter-provider'; -import type { JsonRpcRequest, JsonRpcResponse } from 'json-rpc-engine'; -import { JsonRpcEngine } from 'json-rpc-engine'; +import type { JsonRpcRequest, JsonRpcResponse } from '@metamask/utils'; +import { JsonRpcEngine } from '@metamask/json-rpc-engine'; import { inspect, isDeepStrictEqual } from 'util'; // Store this in case it gets stubbed later diff --git a/yarn.lock b/yarn.lock index e6faa80395..0e522c16e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2020,6 +2020,7 @@ __metadata: "@metamask/eth-json-rpc-middleware": ^11.0.2 "@metamask/eth-json-rpc-provider": ^2.1.0 "@metamask/eth-query": ^3.0.1 + "@metamask/json-rpc-engine": ^7.1.1 "@metamask/rpc-errors": ^6.0.0 "@metamask/swappable-obj-proxy": ^2.1.0 "@metamask/utils": ^8.1.0 @@ -2032,7 +2033,6 @@ __metadata: immer: ^9.0.6 jest: ^27.5.1 jest-when: ^3.4.2 - json-rpc-engine: ^6.1.0 lodash: ^4.17.21 nock: ^13.3.1 sinon: ^9.2.4 From 575937b209bbf70dcb8875b9c0f434476fa4c8a4 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 20 Sep 2023 11:56:28 +0000 Subject: [PATCH 05/16] deps(selected-network-controller): json-rpc-engine@^6.1.0 -> @metamask/json-rpc-engine@^71.1.1 --- packages/network-controller/tests/fake-provider.ts | 2 +- packages/selected-network-controller/package.json | 4 ++-- .../src/SelectedNetworkMiddleware.ts | 2 +- .../tests/SelectedNetworkMiddleware.test.ts | 2 +- yarn.lock | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/network-controller/tests/fake-provider.ts b/packages/network-controller/tests/fake-provider.ts index 3187648dee..0405999a5d 100644 --- a/packages/network-controller/tests/fake-provider.ts +++ b/packages/network-controller/tests/fake-provider.ts @@ -1,6 +1,6 @@ import { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider/dist/safe-event-emitter-provider'; -import type { JsonRpcRequest, JsonRpcResponse } from '@metamask/utils'; import { JsonRpcEngine } from '@metamask/json-rpc-engine'; +import type { JsonRpcRequest, JsonRpcResponse } from '@metamask/utils'; import { inspect, isDeepStrictEqual } from 'util'; // Store this in case it gets stubbed later diff --git a/packages/selected-network-controller/package.json b/packages/selected-network-controller/package.json index 96741d192d..f71f131cb3 100644 --- a/packages/selected-network-controller/package.json +++ b/packages/selected-network-controller/package.json @@ -30,8 +30,8 @@ }, "dependencies": { "@metamask/base-controller": "^3.2.3", - "@metamask/network-controller": "^14.0.0", - "json-rpc-engine": "^6.1.0" + "@metamask/json-rpc-engine": "^7.1.1", + "@metamask/network-controller": "^14.0.0" }, "devDependencies": { "@metamask/auto-changelog": "^3.1.0", diff --git a/packages/selected-network-controller/src/SelectedNetworkMiddleware.ts b/packages/selected-network-controller/src/SelectedNetworkMiddleware.ts index 68b369e9aa..20c97dfcab 100644 --- a/packages/selected-network-controller/src/SelectedNetworkMiddleware.ts +++ b/packages/selected-network-controller/src/SelectedNetworkMiddleware.ts @@ -3,7 +3,7 @@ import type { NetworkClientId, NetworkControllerGetStateAction, } from '@metamask/network-controller'; -import type { JsonRpcMiddleware } from 'json-rpc-engine'; +import type { JsonRpcMiddleware } from '@metamask/json-rpc-engine'; import type { SelectedNetworkControllerGetNetworkClientIdForDomainAction, diff --git a/packages/selected-network-controller/tests/SelectedNetworkMiddleware.test.ts b/packages/selected-network-controller/tests/SelectedNetworkMiddleware.test.ts index 8d7a19e86c..0b368d624e 100644 --- a/packages/selected-network-controller/tests/SelectedNetworkMiddleware.test.ts +++ b/packages/selected-network-controller/tests/SelectedNetworkMiddleware.test.ts @@ -1,6 +1,6 @@ import { ControllerMessenger } from '@metamask/base-controller'; import type { NetworkControllerGetStateAction } from '@metamask/network-controller'; -import { JsonRpcEngine } from 'json-rpc-engine'; +import { JsonRpcEngine } from '@metamask/json-rpc-engine'; import type { SelectedNetworkControllerGetNetworkClientIdForDomainAction, diff --git a/yarn.lock b/yarn.lock index 0e522c16e4..8f8e859866 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2382,12 +2382,12 @@ __metadata: dependencies: "@metamask/auto-changelog": ^3.1.0 "@metamask/base-controller": ^3.2.3 + "@metamask/json-rpc-engine": ^7.1.1 "@metamask/network-controller": ^14.0.0 "@types/jest": ^27.4.1 deepmerge: ^4.2.2 immer: ^9.0.6 jest: ^27.5.1 - json-rpc-engine: ^6.1.0 lodash: ^4.17.21 nock: ^13.3.1 sinon: ^9.2.4 From 7eaa05648bb1e0199c294aea118237b9b203814c Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 20 Sep 2023 11:58:48 +0000 Subject: [PATCH 06/16] devDeps: json-rpc-engine@^6.1.0 -> @metamask/json-rpc-engine@^7.1.1 --- package.json | 2 +- tests/fake-block-tracker.ts | 2 +- yarn.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3d68fda14f..b51b230707 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@metamask/eslint-config-nodejs": "^12.1.0", "@metamask/eslint-config-typescript": "^12.1.0", "@metamask/eth-json-rpc-provider": "^2.1.0", + "@metamask/json-rpc-engine": "^7.1.1", "@metamask/utils": "^8.1.0", "@types/node": "^16.18.54", "@typescript-eslint/eslint-plugin": "^5.62.0", @@ -60,7 +61,6 @@ "eth-block-tracker": "^7.0.1", "execa": "^5.0.0", "isomorphic-fetch": "^3.0.0", - "json-rpc-engine": "^6.1.0", "nock": "^13.3.1", "prettier": "^2.7.1", "prettier-plugin-packagejson": "^2.4.5", diff --git a/tests/fake-block-tracker.ts b/tests/fake-block-tracker.ts index 9513e0fd7d..2f708d2aed 100644 --- a/tests/fake-block-tracker.ts +++ b/tests/fake-block-tracker.ts @@ -1,6 +1,6 @@ import { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider/dist/safe-event-emitter-provider'; import { PollingBlockTracker } from 'eth-block-tracker'; -import { JsonRpcEngine } from 'json-rpc-engine'; +import { JsonRpcEngine } from '@metamask/json-rpc-engine'; /** * Acts like a PollingBlockTracker, but doesn't start the polling loop or diff --git a/yarn.lock b/yarn.lock index 8f8e859866..7b7aad080c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1540,6 +1540,7 @@ __metadata: "@metamask/eslint-config-nodejs": ^12.1.0 "@metamask/eslint-config-typescript": ^12.1.0 "@metamask/eth-json-rpc-provider": ^2.1.0 + "@metamask/json-rpc-engine": ^7.1.1 "@metamask/utils": ^8.1.0 "@types/node": ^16.18.54 "@typescript-eslint/eslint-plugin": ^5.62.0 @@ -1556,7 +1557,6 @@ __metadata: eth-block-tracker: ^7.0.1 execa: ^5.0.0 isomorphic-fetch: ^3.0.0 - json-rpc-engine: ^6.1.0 nock: ^13.3.1 prettier: ^2.7.1 prettier-plugin-packagejson: ^2.4.5 From 4c36b0fb63f9392c2e8791020b590e5bbb172811 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 21 Sep 2023 10:05:35 +0000 Subject: [PATCH 07/16] deps(network-controller): @metamask/eth-json-rpc-middleware@^11.0.2->^12.0.0 --- packages/network-controller/package.json | 2 +- .../src/create-network-client.ts | 8 ++-- .../src/SelectedNetworkMiddleware.ts | 2 +- .../tests/SelectedNetworkMiddleware.test.ts | 2 +- tests/fake-block-tracker.ts | 2 +- yarn.lock | 44 ++++++++++++++----- 6 files changed, 40 insertions(+), 20 deletions(-) diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index 73e8b888b1..0ad1430d33 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -32,7 +32,7 @@ "@metamask/base-controller": "^3.2.3", "@metamask/controller-utils": "^5.0.2", "@metamask/eth-json-rpc-infura": "^9.0.0", - "@metamask/eth-json-rpc-middleware": "^11.0.2", + "@metamask/eth-json-rpc-middleware": "^12.0.0", "@metamask/eth-json-rpc-provider": "^2.1.0", "@metamask/eth-query": "^3.0.1", "@metamask/json-rpc-engine": "^7.1.1", diff --git a/packages/network-controller/src/create-network-client.ts b/packages/network-controller/src/create-network-client.ts index f1daeb7f68..51827e6740 100644 --- a/packages/network-controller/src/create-network-client.ts +++ b/packages/network-controller/src/create-network-client.ts @@ -15,8 +15,6 @@ import { providerFromEngine, providerFromMiddleware, } from '@metamask/eth-json-rpc-provider'; -import type { Hex } from '@metamask/utils'; -import { PollingBlockTracker } from 'eth-block-tracker'; import { createAsyncMiddleware, createScaffoldMiddleware, @@ -24,6 +22,8 @@ import { mergeMiddleware, } from '@metamask/json-rpc-engine'; import type { JsonRpcMiddleware } from '@metamask/json-rpc-engine'; +import type { Hex, Json, JsonRpcParams } from '@metamask/utils'; +import { PollingBlockTracker } from 'eth-block-tracker'; import type { BlockTracker, @@ -126,7 +126,7 @@ function createInfuraNetworkMiddleware({ blockTracker: PollingBlockTracker; network: InfuraNetworkType; rpcProvider: SafeEventEmitterProvider; - rpcApiMiddleware: JsonRpcMiddleware; + rpcApiMiddleware: JsonRpcMiddleware; }) { return mergeMiddleware([ createNetworkAndChainIdMiddleware({ network }), @@ -158,7 +158,7 @@ function createNetworkAndChainIdMiddleware({ const createChainIdMiddleware = ( chainId: Hex, -): JsonRpcMiddleware => { +): JsonRpcMiddleware => { return (req, res, next, end) => { if (req.method === 'eth_chainId') { res.result = chainId; diff --git a/packages/selected-network-controller/src/SelectedNetworkMiddleware.ts b/packages/selected-network-controller/src/SelectedNetworkMiddleware.ts index 20c97dfcab..fca882e52f 100644 --- a/packages/selected-network-controller/src/SelectedNetworkMiddleware.ts +++ b/packages/selected-network-controller/src/SelectedNetworkMiddleware.ts @@ -1,9 +1,9 @@ import type { ControllerMessenger } from '@metamask/base-controller'; +import type { JsonRpcMiddleware } from '@metamask/json-rpc-engine'; import type { NetworkClientId, NetworkControllerGetStateAction, } from '@metamask/network-controller'; -import type { JsonRpcMiddleware } from '@metamask/json-rpc-engine'; import type { SelectedNetworkControllerGetNetworkClientIdForDomainAction, diff --git a/packages/selected-network-controller/tests/SelectedNetworkMiddleware.test.ts b/packages/selected-network-controller/tests/SelectedNetworkMiddleware.test.ts index 0b368d624e..71e807a2d4 100644 --- a/packages/selected-network-controller/tests/SelectedNetworkMiddleware.test.ts +++ b/packages/selected-network-controller/tests/SelectedNetworkMiddleware.test.ts @@ -1,6 +1,6 @@ import { ControllerMessenger } from '@metamask/base-controller'; -import type { NetworkControllerGetStateAction } from '@metamask/network-controller'; import { JsonRpcEngine } from '@metamask/json-rpc-engine'; +import type { NetworkControllerGetStateAction } from '@metamask/network-controller'; import type { SelectedNetworkControllerGetNetworkClientIdForDomainAction, diff --git a/tests/fake-block-tracker.ts b/tests/fake-block-tracker.ts index 2f708d2aed..7f304fe7af 100644 --- a/tests/fake-block-tracker.ts +++ b/tests/fake-block-tracker.ts @@ -1,6 +1,6 @@ import { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider/dist/safe-event-emitter-provider'; -import { PollingBlockTracker } from 'eth-block-tracker'; import { JsonRpcEngine } from '@metamask/json-rpc-engine'; +import { PollingBlockTracker } from 'eth-block-tracker'; /** * Acts like a PollingBlockTracker, but doesn't start the polling loop or diff --git a/yarn.lock b/yarn.lock index 7b7aad080c..de720072b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1686,20 +1686,20 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-json-rpc-middleware@npm:^11.0.2": - version: 11.0.2 - resolution: "@metamask/eth-json-rpc-middleware@npm:11.0.2" +"@metamask/eth-json-rpc-middleware@npm:^12.0.0": + version: 12.0.0 + resolution: "@metamask/eth-json-rpc-middleware@npm:12.0.0" dependencies: - "@metamask/eth-json-rpc-provider": ^1.0.0 - "@metamask/eth-sig-util": ^6.0.0 - "@metamask/utils": ^5.0.1 + "@metamask/eth-json-rpc-provider": ^2.1.0 + "@metamask/eth-sig-util": ^7.0.0 + "@metamask/json-rpc-engine": ^7.1.1 + "@metamask/rpc-errors": ^6.0.0 + "@metamask/utils": ^8.1.0 clone: ^2.1.1 - eth-block-tracker: ^7.0.1 - eth-rpc-errors: ^4.0.3 - json-rpc-engine: ^6.1.0 + eth-block-tracker: ^8.0.0 pify: ^3.0.0 safe-stable-stringify: ^2.3.2 - checksum: e548012b65d33111618e4a30a21b82f22d473e6f9d1ed98f5a8b7db61ffad956f2a09a0196f60bd0ac800f4ed1b19ddb16f680915112a6649fcc2084412ecd0f + checksum: 6f67061008d6f9675e1d82682f27f9c2eaa20a425f15674a01659765f3f69d3ff3b337b490907b1d87cf2cb6ccc561f30e6a64c35329d4d134e953d0b4d1a062 languageName: node linkType: hard @@ -2017,7 +2017,7 @@ __metadata: "@metamask/base-controller": ^3.2.3 "@metamask/controller-utils": ^5.0.2 "@metamask/eth-json-rpc-infura": ^9.0.0 - "@metamask/eth-json-rpc-middleware": ^11.0.2 + "@metamask/eth-json-rpc-middleware": ^12.0.0 "@metamask/eth-json-rpc-provider": ^2.1.0 "@metamask/eth-query": ^3.0.1 "@metamask/json-rpc-engine": ^7.1.1 @@ -5360,6 +5360,19 @@ __metadata: languageName: node linkType: hard +"eth-block-tracker@npm:^8.0.0": + version: 8.0.0 + resolution: "eth-block-tracker@npm:8.0.0" + dependencies: + "@metamask/eth-json-rpc-provider": ^2.1.0 + "@metamask/safe-event-emitter": ^3.0.0 + "@metamask/utils": ^8.1.0 + json-rpc-random-id: ^1.0.1 + pify: ^5.0.0 + checksum: 734d42f4059e051d71a1e13bf7624e09b3fd1d8aa80ed36408201640f02f4b18618e12f1269df3522299a88198c562deb934b5045a0e2ce42a07ac9f883d3710 + languageName: node + linkType: hard + "eth-ens-namehash@npm:^2.0.8": version: 2.0.8 resolution: "eth-ens-namehash@npm:2.0.8" @@ -5388,7 +5401,7 @@ __metadata: languageName: node linkType: hard -"eth-rpc-errors@npm:^4.0.2, eth-rpc-errors@npm:^4.0.3": +"eth-rpc-errors@npm:^4.0.2": version: 4.0.3 resolution: "eth-rpc-errors@npm:4.0.3" dependencies: @@ -8647,6 +8660,13 @@ __metadata: languageName: node linkType: hard +"pify@npm:^5.0.0": + version: 5.0.0 + resolution: "pify@npm:5.0.0" + checksum: 443e3e198ad6bfa8c0c533764cf75c9d5bc976387a163792fb553ffe6ce923887cf14eebf5aea9b7caa8eab930da8c33612990ae85bd8c2bc18bedb9eae94ecb + languageName: node + linkType: hard + "pirates@npm:^4.0.4": version: 4.0.6 resolution: "pirates@npm:4.0.6" From 573e59c8f9733fd0d1ce27472c344dd72e7e964d Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 21 Sep 2023 10:06:59 +0000 Subject: [PATCH 08/16] deps(network-controller): eth-block-tracker@^7.1.0->^8.0.0 --- package.json | 2 +- packages/network-controller/package.json | 2 +- yarn.lock | 64 +++++++----------------- 3 files changed, 19 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index b51b230707..18609d1d3e 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "eslint-plugin-n": "^15.7.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-promise": "^6.1.1", - "eth-block-tracker": "^7.0.1", + "eth-block-tracker": "^8.0.0", "execa": "^5.0.0", "isomorphic-fetch": "^3.0.0", "nock": "^13.3.1", diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index 0ad1430d33..514ddb300d 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -40,7 +40,7 @@ "@metamask/swappable-obj-proxy": "^2.1.0", "@metamask/utils": "^8.1.0", "async-mutex": "^0.2.6", - "eth-block-tracker": "^7.0.1", + "eth-block-tracker": "^8.0.0", "immer": "^9.0.6", "uuid": "^8.3.2" }, diff --git a/yarn.lock b/yarn.lock index de720072b9..3772cf2be0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1554,7 +1554,7 @@ __metadata: eslint-plugin-n: ^15.7.0 eslint-plugin-prettier: ^4.2.1 eslint-plugin-promise: ^6.1.1 - eth-block-tracker: ^7.0.1 + eth-block-tracker: ^8.0.0 execa: ^5.0.0 isomorphic-fetch: ^3.0.0 nock: ^13.3.1 @@ -1695,21 +1695,11 @@ __metadata: "@metamask/json-rpc-engine": ^7.1.1 "@metamask/rpc-errors": ^6.0.0 "@metamask/utils": ^8.1.0 - clone: ^2.1.1 eth-block-tracker: ^8.0.0 - pify: ^3.0.0 - safe-stable-stringify: ^2.3.2 - checksum: 6f67061008d6f9675e1d82682f27f9c2eaa20a425f15674a01659765f3f69d3ff3b337b490907b1d87cf2cb6ccc561f30e6a64c35329d4d134e953d0b4d1a062 - languageName: node - linkType: hard - -"@metamask/eth-json-rpc-provider@npm:^1.0.0": - version: 1.0.0 - resolution: "@metamask/eth-json-rpc-provider@npm:1.0.0" - dependencies: - "@metamask/safe-event-emitter": ^2.0.0 - json-rpc-engine: ^6.1.0 - checksum: 27865d84d90030db1a9e5a66bc0b0ae079706fb7be635ec1e9bd4f64771e819aae78f0a026c6629d3a1a2eb277fcd51977315c049c47a70df1dd95d1d4106982 + klona: ^2.0.6 + pify: ^5.0.0 + safe-stable-stringify: ^2.4.3 + checksum: 22391116f752abcb0145385297b426450260e857d9a37b6aeb7602f48079126e0920d39d28ec3e6de8fc247d589dd089731198af4f92aa98974fa45d37ede027 languageName: node linkType: hard @@ -2029,7 +2019,7 @@ __metadata: "@types/lodash": ^4.14.191 async-mutex: ^0.2.6 deepmerge: ^4.2.2 - eth-block-tracker: ^7.0.1 + eth-block-tracker: ^8.0.0 immer: ^9.0.6 jest: ^27.5.1 jest-when: ^3.4.2 @@ -2670,7 +2660,7 @@ __metadata: languageName: node linkType: hard -"@metamask/utils@npm:^5.0.0, @metamask/utils@npm:^5.0.1, @metamask/utils@npm:^5.0.2": +"@metamask/utils@npm:^5.0.0, @metamask/utils@npm:^5.0.2": version: 5.0.2 resolution: "@metamask/utils@npm:5.0.2" dependencies: @@ -4317,13 +4307,6 @@ __metadata: languageName: node linkType: hard -"clone@npm:^2.1.1": - version: 2.1.2 - resolution: "clone@npm:2.1.2" - checksum: aaf106e9bc025b21333e2f4c12da539b568db4925c0501a1bf4070836c9e848c892fa22c35548ce0d1132b08bbbfa17a00144fe58fccdab6fa900fec4250f67d - languageName: node - linkType: hard - "cmd-shim@npm:^6.0.0": version: 6.0.1 resolution: "cmd-shim@npm:6.0.1" @@ -5347,19 +5330,6 @@ __metadata: languageName: node linkType: hard -"eth-block-tracker@npm:^7.0.1": - version: 7.1.0 - resolution: "eth-block-tracker@npm:7.1.0" - dependencies: - "@metamask/eth-json-rpc-provider": ^1.0.0 - "@metamask/safe-event-emitter": ^3.0.0 - "@metamask/utils": ^5.0.1 - json-rpc-random-id: ^1.0.1 - pify: ^3.0.0 - checksum: 1d019f261e0ef07387cd74538b160700caa35ba9859ab9d4e5137c48bf9c92822c3b4ade40f8a504f16cb813de4c317c5378d047625ddf04592e256be8842588 - languageName: node - linkType: hard - "eth-block-tracker@npm:^8.0.0": version: 8.0.0 resolution: "eth-block-tracker@npm:8.0.0" @@ -5369,7 +5339,7 @@ __metadata: "@metamask/utils": ^8.1.0 json-rpc-random-id: ^1.0.1 pify: ^5.0.0 - checksum: 734d42f4059e051d71a1e13bf7624e09b3fd1d8aa80ed36408201640f02f4b18618e12f1269df3522299a88198c562deb934b5045a0e2ce42a07ac9f883d3710 + checksum: 3416c2ee653f81d1f71f3a9b80e04837fb516494f64ded45c053dfc24c6c6ce8dac7e5b8376cd57f52838f43a93d20a8e17d4d875e50d1e4c267543ffe0e6ad8 languageName: node linkType: hard @@ -5401,7 +5371,7 @@ __metadata: languageName: node linkType: hard -"eth-rpc-errors@npm:^4.0.2": +"eth-rpc-errors@npm:^4.0.2, eth-rpc-errors@npm:^4.0.3": version: 4.0.3 resolution: "eth-rpc-errors@npm:4.0.3" dependencies: @@ -7748,6 +7718,13 @@ __metadata: languageName: node linkType: hard +"klona@npm:^2.0.6": + version: 2.0.6 + resolution: "klona@npm:2.0.6" + checksum: ac9ee3732e42b96feb67faae4d27cf49494e8a3bf3fa7115ce242fe04786788e0aff4741a07a45a2462e2079aa983d73d38519c85d65b70ef11447bbc3c58ce7 + languageName: node + linkType: hard + "leven@npm:^3.1.0": version: 3.1.0 resolution: "leven@npm:3.1.0" @@ -8653,13 +8630,6 @@ __metadata: languageName: node linkType: hard -"pify@npm:^3.0.0": - version: 3.0.0 - resolution: "pify@npm:3.0.0" - checksum: 6cdcbc3567d5c412450c53261a3f10991665d660961e06605decf4544a61a97a54fefe70a68d5c37080ff9d6f4cf51444c90198d1ba9f9309a6c0d6e9f5c4fde - languageName: node - linkType: hard - "pify@npm:^5.0.0": version: 5.0.0 resolution: "pify@npm:5.0.0" @@ -9171,7 +9141,7 @@ __metadata: languageName: node linkType: hard -"safe-stable-stringify@npm:^2.3.2": +"safe-stable-stringify@npm:^2.4.3": version: 2.4.3 resolution: "safe-stable-stringify@npm:2.4.3" checksum: 3aeb64449706ee1f5ad2459fc99648b131d48e7a1fbb608d7c628020177512dc9d94108a5cb61bbc953985d313d0afea6566d243237743e02870490afef04b43 From 2f689c65051fc8026fca313cdbc911fa652ff6ec Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 21 Sep 2023 10:59:49 +0000 Subject: [PATCH 09/16] types(network-controller): change type alias BlockTracker from class PollingBlockTracker to type BlockTracker --- packages/network-controller/src/types.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/network-controller/src/types.ts b/packages/network-controller/src/types.ts index af39896249..1f12b3856a 100644 --- a/packages/network-controller/src/types.ts +++ b/packages/network-controller/src/types.ts @@ -1,11 +1,10 @@ import type { InfuraNetworkType } from '@metamask/controller-utils'; import type { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider'; import type { Hex } from '@metamask/utils'; -import type { PollingBlockTracker } from 'eth-block-tracker'; +export type { BlockTracker } from 'eth-block-tracker'; export type Provider = SafeEventEmitterProvider; -export type BlockTracker = PollingBlockTracker; /** * The type of network client that can be created. From 3a809ba90dce8e16abb73639b939cabc00312134 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 21 Sep 2023 11:21:51 +0000 Subject: [PATCH 10/16] eth-block-tracker update --- packages/network-controller/src/types.ts | 5 ++++- packages/network-controller/tests/NetworkController.test.ts | 4 ++-- .../network-controller/tests/provider-api-tests/helpers.ts | 2 +- tests/fake-block-tracker.ts | 5 ++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/network-controller/src/types.ts b/packages/network-controller/src/types.ts index 1f12b3856a..de069964f7 100644 --- a/packages/network-controller/src/types.ts +++ b/packages/network-controller/src/types.ts @@ -1,10 +1,13 @@ import type { InfuraNetworkType } from '@metamask/controller-utils'; import type { SafeEventEmitterProvider } from '@metamask/eth-json-rpc-provider'; import type { Hex } from '@metamask/utils'; -export type { BlockTracker } from 'eth-block-tracker'; +import type { BlockTracker as BaseBlockTracker } from 'eth-block-tracker'; export type Provider = SafeEventEmitterProvider; +export type BlockTracker = BaseBlockTracker & { + checkForLatestBlock(): Promise; +}; /** * The type of network client that can be created. diff --git a/packages/network-controller/tests/NetworkController.test.ts b/packages/network-controller/tests/NetworkController.test.ts index a0da019abb..cebf7ec4e1 100644 --- a/packages/network-controller/tests/NetworkController.test.ts +++ b/packages/network-controller/tests/NetworkController.test.ts @@ -27,7 +27,7 @@ import type { ProviderConfig, } from '../src/NetworkController'; import { NetworkController } from '../src/NetworkController'; -import type { Provider } from '../src/types'; +import type { BlockTracker, Provider } from '../src/types'; import { NetworkClientType } from '../src/types'; import type { FakeProviderStub } from './fake-provider'; import { FakeProvider } from './fake-provider'; @@ -6957,7 +6957,7 @@ function buildFakeClient( rpcUrl: 'https://test.network', }, provider, - blockTracker: new FakeBlockTracker(), + blockTracker: new FakeBlockTracker() as BlockTracker, destroy: () => { // do nothing }, diff --git a/packages/network-controller/tests/provider-api-tests/helpers.ts b/packages/network-controller/tests/provider-api-tests/helpers.ts index c3d87f4656..a3382f87b0 100644 --- a/packages/network-controller/tests/provider-api-tests/helpers.ts +++ b/packages/network-controller/tests/provider-api-tests/helpers.ts @@ -456,7 +456,7 @@ export async function withNetworkClient( const { provider, blockTracker } = clientUnderTest; - const ethQuery = new EthQuery(provider); + const ethQuery = new EthQuery(provider as any); const curriedMakeRpcCall = (request: Request) => makeRpcCall(ethQuery, request); const makeRpcCallsInSeries = async (requests: Request[]) => { diff --git a/tests/fake-block-tracker.ts b/tests/fake-block-tracker.ts index 7f304fe7af..70d1abac89 100644 --- a/tests/fake-block-tracker.ts +++ b/tests/fake-block-tracker.ts @@ -13,10 +13,9 @@ export class FakeBlockTracker extends PollingBlockTracker { super({ provider: new SafeEventEmitterProvider({ engine: new JsonRpcEngine() }), }); - } - - override async _start() { // Don't start the polling loop + // eslint-disable-next-line @typescript-eslint/no-empty-function + (this as any).start = () => {}; } /** From 8b997a6c4ed20555191fd18fc466cea93d9b827e Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 20 Sep 2023 10:59:25 +0000 Subject: [PATCH 11/16] ignore mismatching internal eth-json-rpc provider types --- packages/gas-fee-controller/src/GasFeeController.ts | 7 ++++--- packages/network-controller/src/NetworkController.ts | 6 ++++-- packages/network-controller/src/create-network-client.ts | 6 ++++-- .../transaction-controller/src/TransactionController.ts | 6 ++++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/gas-fee-controller/src/GasFeeController.ts b/packages/gas-fee-controller/src/GasFeeController.ts index a81f77dff3..656d78f0d8 100644 --- a/packages/gas-fee-controller/src/GasFeeController.ts +++ b/packages/gas-fee-controller/src/GasFeeController.ts @@ -342,7 +342,7 @@ export class GasFeeController extends PollingController< this.legacyAPIEndpoint = legacyAPIEndpoint; this.clientId = clientId; - this.ethQuery = new EthQuery(this.#getProvider()); + this.ethQuery = new EthQuery(this.#getProvider() as any); if (onNetworkStateChange && getChainId) { this.currentChainId = getChainId(); @@ -417,7 +417,8 @@ export class GasFeeController extends PollingController< isEIP1559Compatible = false; } - const ethQuery = new EthQuery(networkClient.provider); + // TODO: provider type alignment + const ethQuery = new EthQuery(networkClient.provider as any); const gasFeeCalculations = await determineGasFeeCalculations({ isEIP1559Compatible, @@ -588,7 +589,7 @@ export class GasFeeController extends PollingController< const newChainId = networkControllerState.providerConfig.chainId; if (newChainId !== this.currentChainId) { - this.ethQuery = new EthQuery(this.#getProvider()); + this.ethQuery = new EthQuery(this.#getProvider() as any); await this.resetPolling(); this.currentChainId = newChainId; diff --git a/packages/network-controller/src/NetworkController.ts b/packages/network-controller/src/NetworkController.ts index e4795edaf5..a1281218c0 100644 --- a/packages/network-controller/src/NetworkController.ts +++ b/packages/network-controller/src/NetworkController.ts @@ -980,7 +980,8 @@ export class NetworkController extends BaseControllerV2< } const networkClient = this.getNetworkClientById(networkClientId); - const ethQuery = new EthQuery(networkClient.provider); + // TODO: Provider type alignment + const ethQuery = new EthQuery(networkClient.provider as any); return new Promise((resolve, reject) => { ethQuery.sendAsync( @@ -1545,6 +1546,7 @@ export class NetworkController extends BaseControllerV2< }); } - this.#ethQuery = new EthQuery(this.#providerProxy); + // TODO: Provider type alignment + this.#ethQuery = new EthQuery(this.#providerProxy as any); } } diff --git a/packages/network-controller/src/create-network-client.ts b/packages/network-controller/src/create-network-client.ts index 51827e6740..b9c004df49 100644 --- a/packages/network-controller/src/create-network-client.ts +++ b/packages/network-controller/src/create-network-client.ts @@ -68,7 +68,8 @@ export function createNetworkClient( rpcUrl: networkConfig.rpcUrl, }); - const rpcProvider = providerFromMiddleware(rpcApiMiddleware); + // FIXME: types + const rpcProvider = providerFromMiddleware(rpcApiMiddleware as any); const blockTrackerOpts = // eslint-disable-next-line n/no-process-env @@ -77,7 +78,8 @@ export function createNetworkClient( : {}; const blockTracker = new PollingBlockTracker({ ...blockTrackerOpts, - provider: rpcProvider, + // FIXME: types + provider: rpcProvider as any, }); const networkMiddleware = diff --git a/packages/transaction-controller/src/TransactionController.ts b/packages/transaction-controller/src/TransactionController.ts index 95a006a104..f6ad50094d 100644 --- a/packages/transaction-controller/src/TransactionController.ts +++ b/packages/transaction-controller/src/TransactionController.ts @@ -316,7 +316,8 @@ export class TransactionController extends BaseController< this.provider = provider; this.messagingSystem = messenger; this.getNetworkState = getNetworkState; - this.ethQuery = new EthQuery(provider); + // TODO: Provider type alignment + this.ethQuery = new EthQuery(provider as any); this.isSendFlowHistoryDisabled = disableSendFlowHistory ?? false; this.isHistoryDisabled = disableHistory ?? false; this.registry = new MethodRegistry({ provider }); @@ -389,7 +390,8 @@ export class TransactionController extends BaseController< ); onNetworkStateChange(() => { - this.ethQuery = new EthQuery(this.provider); + // TODO: Provider type alignment + this.ethQuery = new EthQuery(this.provider as any); this.registry = new MethodRegistry({ provider: this.provider }); }); From e47bcc62e5dcda1d8aad130909971aa7145f7a1d Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Tue, 10 Oct 2023 01:56:57 +0000 Subject: [PATCH 12/16] types(network-controller): type createCustomNetworkMiddleware --- packages/network-controller/src/create-network-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/network-controller/src/create-network-client.ts b/packages/network-controller/src/create-network-client.ts index b9c004df49..ce87a4ef56 100644 --- a/packages/network-controller/src/create-network-client.ts +++ b/packages/network-controller/src/create-network-client.ts @@ -186,8 +186,8 @@ function createCustomNetworkMiddleware({ }: { blockTracker: PollingBlockTracker; chainId: Hex; - rpcApiMiddleware: any; -}) { + rpcApiMiddleware: JsonRpcMiddleware; +}): JsonRpcMiddleware { // eslint-disable-next-line n/no-process-env const testMiddlewares = process.env.IN_TEST ? [createEstimateGasDelayTestMiddleware()] From bec2646e5629a669ebb3f1b521194eadff268189 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Tue, 10 Oct 2023 11:01:06 +0900 Subject: [PATCH 13/16] Revert "ignore mismatching internal eth-json-rpc provider types" This reverts commit bc269f58689e52170561834847a0f3b97e7db361. --- packages/gas-fee-controller/src/GasFeeController.ts | 7 +++---- packages/network-controller/src/NetworkController.ts | 6 ++---- packages/network-controller/src/create-network-client.ts | 6 ++---- .../transaction-controller/src/TransactionController.ts | 6 ++---- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/packages/gas-fee-controller/src/GasFeeController.ts b/packages/gas-fee-controller/src/GasFeeController.ts index 656d78f0d8..a81f77dff3 100644 --- a/packages/gas-fee-controller/src/GasFeeController.ts +++ b/packages/gas-fee-controller/src/GasFeeController.ts @@ -342,7 +342,7 @@ export class GasFeeController extends PollingController< this.legacyAPIEndpoint = legacyAPIEndpoint; this.clientId = clientId; - this.ethQuery = new EthQuery(this.#getProvider() as any); + this.ethQuery = new EthQuery(this.#getProvider()); if (onNetworkStateChange && getChainId) { this.currentChainId = getChainId(); @@ -417,8 +417,7 @@ export class GasFeeController extends PollingController< isEIP1559Compatible = false; } - // TODO: provider type alignment - const ethQuery = new EthQuery(networkClient.provider as any); + const ethQuery = new EthQuery(networkClient.provider); const gasFeeCalculations = await determineGasFeeCalculations({ isEIP1559Compatible, @@ -589,7 +588,7 @@ export class GasFeeController extends PollingController< const newChainId = networkControllerState.providerConfig.chainId; if (newChainId !== this.currentChainId) { - this.ethQuery = new EthQuery(this.#getProvider() as any); + this.ethQuery = new EthQuery(this.#getProvider()); await this.resetPolling(); this.currentChainId = newChainId; diff --git a/packages/network-controller/src/NetworkController.ts b/packages/network-controller/src/NetworkController.ts index a1281218c0..e4795edaf5 100644 --- a/packages/network-controller/src/NetworkController.ts +++ b/packages/network-controller/src/NetworkController.ts @@ -980,8 +980,7 @@ export class NetworkController extends BaseControllerV2< } const networkClient = this.getNetworkClientById(networkClientId); - // TODO: Provider type alignment - const ethQuery = new EthQuery(networkClient.provider as any); + const ethQuery = new EthQuery(networkClient.provider); return new Promise((resolve, reject) => { ethQuery.sendAsync( @@ -1546,7 +1545,6 @@ export class NetworkController extends BaseControllerV2< }); } - // TODO: Provider type alignment - this.#ethQuery = new EthQuery(this.#providerProxy as any); + this.#ethQuery = new EthQuery(this.#providerProxy); } } diff --git a/packages/network-controller/src/create-network-client.ts b/packages/network-controller/src/create-network-client.ts index ce87a4ef56..99eddd9bf7 100644 --- a/packages/network-controller/src/create-network-client.ts +++ b/packages/network-controller/src/create-network-client.ts @@ -68,8 +68,7 @@ export function createNetworkClient( rpcUrl: networkConfig.rpcUrl, }); - // FIXME: types - const rpcProvider = providerFromMiddleware(rpcApiMiddleware as any); + const rpcProvider = providerFromMiddleware(rpcApiMiddleware); const blockTrackerOpts = // eslint-disable-next-line n/no-process-env @@ -78,8 +77,7 @@ export function createNetworkClient( : {}; const blockTracker = new PollingBlockTracker({ ...blockTrackerOpts, - // FIXME: types - provider: rpcProvider as any, + provider: rpcProvider, }); const networkMiddleware = diff --git a/packages/transaction-controller/src/TransactionController.ts b/packages/transaction-controller/src/TransactionController.ts index f6ad50094d..95a006a104 100644 --- a/packages/transaction-controller/src/TransactionController.ts +++ b/packages/transaction-controller/src/TransactionController.ts @@ -316,8 +316,7 @@ export class TransactionController extends BaseController< this.provider = provider; this.messagingSystem = messenger; this.getNetworkState = getNetworkState; - // TODO: Provider type alignment - this.ethQuery = new EthQuery(provider as any); + this.ethQuery = new EthQuery(provider); this.isSendFlowHistoryDisabled = disableSendFlowHistory ?? false; this.isHistoryDisabled = disableHistory ?? false; this.registry = new MethodRegistry({ provider }); @@ -390,8 +389,7 @@ export class TransactionController extends BaseController< ); onNetworkStateChange(() => { - // TODO: Provider type alignment - this.ethQuery = new EthQuery(this.provider as any); + this.ethQuery = new EthQuery(this.provider); this.registry = new MethodRegistry({ provider: this.provider }); }); From 08d912c5d727a7b90db20e8c49c5cac974da805e Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Tue, 10 Oct 2023 02:08:00 +0000 Subject: [PATCH 14/16] types: @ts-expect-error mismatching eth-json-rpc provider types --- packages/gas-fee-controller/src/GasFeeController.ts | 3 +++ packages/network-controller/src/NetworkController.ts | 2 ++ packages/transaction-controller/src/TransactionController.ts | 2 ++ 3 files changed, 7 insertions(+) diff --git a/packages/gas-fee-controller/src/GasFeeController.ts b/packages/gas-fee-controller/src/GasFeeController.ts index a81f77dff3..659bc37abb 100644 --- a/packages/gas-fee-controller/src/GasFeeController.ts +++ b/packages/gas-fee-controller/src/GasFeeController.ts @@ -342,6 +342,7 @@ export class GasFeeController extends PollingController< this.legacyAPIEndpoint = legacyAPIEndpoint; this.clientId = clientId; + // @ts-expect-error TODO: Provider type alignment this.ethQuery = new EthQuery(this.#getProvider()); if (onNetworkStateChange && getChainId) { @@ -417,6 +418,7 @@ export class GasFeeController extends PollingController< isEIP1559Compatible = false; } + // @ts-expect-error TODO: Provider type alignment const ethQuery = new EthQuery(networkClient.provider); const gasFeeCalculations = await determineGasFeeCalculations({ @@ -588,6 +590,7 @@ export class GasFeeController extends PollingController< const newChainId = networkControllerState.providerConfig.chainId; if (newChainId !== this.currentChainId) { + // @ts-expect-error TODO: Provider type alignment this.ethQuery = new EthQuery(this.#getProvider()); await this.resetPolling(); diff --git a/packages/network-controller/src/NetworkController.ts b/packages/network-controller/src/NetworkController.ts index e4795edaf5..424f6de958 100644 --- a/packages/network-controller/src/NetworkController.ts +++ b/packages/network-controller/src/NetworkController.ts @@ -980,6 +980,7 @@ export class NetworkController extends BaseControllerV2< } const networkClient = this.getNetworkClientById(networkClientId); + // @ts-expect-error TODO: Provider type alignment const ethQuery = new EthQuery(networkClient.provider); return new Promise((resolve, reject) => { @@ -1545,6 +1546,7 @@ export class NetworkController extends BaseControllerV2< }); } + // @ts-expect-error TODO: Provider type alignment this.#ethQuery = new EthQuery(this.#providerProxy); } } diff --git a/packages/transaction-controller/src/TransactionController.ts b/packages/transaction-controller/src/TransactionController.ts index 95a006a104..0e3c812a4a 100644 --- a/packages/transaction-controller/src/TransactionController.ts +++ b/packages/transaction-controller/src/TransactionController.ts @@ -316,6 +316,7 @@ export class TransactionController extends BaseController< this.provider = provider; this.messagingSystem = messenger; this.getNetworkState = getNetworkState; + // @ts-expect-error TODO: Provider type alignment this.ethQuery = new EthQuery(provider); this.isSendFlowHistoryDisabled = disableSendFlowHistory ?? false; this.isHistoryDisabled = disableHistory ?? false; @@ -389,6 +390,7 @@ export class TransactionController extends BaseController< ); onNetworkStateChange(() => { + // @ts-expect-error TODO: Provider type alignment this.ethQuery = new EthQuery(this.provider); this.registry = new MethodRegistry({ provider: this.provider }); }); From d80a8d7f5ba0dee9bd4d468db768472e6f283324 Mon Sep 17 00:00:00 2001 From: legobeat <109787230+legobeat@users.noreply.github.com> Date: Tue, 10 Oct 2023 02:12:07 +0000 Subject: [PATCH 15/16] @ts-expect eth-json-rpc provider type Co-authored-by: Elliot Winkler --- .../network-controller/tests/provider-api-tests/helpers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/network-controller/tests/provider-api-tests/helpers.ts b/packages/network-controller/tests/provider-api-tests/helpers.ts index a3382f87b0..8d4cda0f82 100644 --- a/packages/network-controller/tests/provider-api-tests/helpers.ts +++ b/packages/network-controller/tests/provider-api-tests/helpers.ts @@ -456,7 +456,8 @@ export async function withNetworkClient( const { provider, blockTracker } = clientUnderTest; - const ethQuery = new EthQuery(provider as any); + // @ts-expect-error TODO: Provider type alignment + const ethQuery = new EthQuery(provider); const curriedMakeRpcCall = (request: Request) => makeRpcCall(ethQuery, request); const makeRpcCallsInSeries = async (requests: Request[]) => { From d1dd687996fe29951d4acd9b9810447a691003fc Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 11 Oct 2023 06:59:18 +0000 Subject: [PATCH 16/16] deps: @metamask/rpc-errors@^6.0.0->^6.1.0 --- packages/approval-controller/package.json | 2 +- packages/assets-controllers/package.json | 2 +- packages/network-controller/package.json | 2 +- packages/permission-controller/package.json | 2 +- packages/rate-limit-controller/package.json | 2 +- packages/signature-controller/package.json | 2 +- packages/transaction-controller/package.json | 2 +- yarn.lock | 24 ++++++++++---------- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/approval-controller/package.json b/packages/approval-controller/package.json index 93510380db..5a1cb47244 100644 --- a/packages/approval-controller/package.json +++ b/packages/approval-controller/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "@metamask/base-controller": "^3.2.3", - "@metamask/rpc-errors": "^6.0.0", + "@metamask/rpc-errors": "^6.1.0", "@metamask/utils": "^8.1.0", "immer": "^9.0.6", "nanoid": "^3.1.31" diff --git a/packages/assets-controllers/package.json b/packages/assets-controllers/package.json index def007df8a..bbd731fcfc 100644 --- a/packages/assets-controllers/package.json +++ b/packages/assets-controllers/package.json @@ -42,7 +42,7 @@ "@metamask/metamask-eth-abis": "3.0.0", "@metamask/network-controller": "^14.0.0", "@metamask/preferences-controller": "^4.4.2", - "@metamask/rpc-errors": "^6.0.0", + "@metamask/rpc-errors": "^6.1.0", "@metamask/utils": "^8.1.0", "@types/uuid": "^8.3.0", "async-mutex": "^0.2.6", diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index 514ddb300d..8357dfe6e3 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -36,7 +36,7 @@ "@metamask/eth-json-rpc-provider": "^2.1.0", "@metamask/eth-query": "^3.0.1", "@metamask/json-rpc-engine": "^7.1.1", - "@metamask/rpc-errors": "^6.0.0", + "@metamask/rpc-errors": "^6.1.0", "@metamask/swappable-obj-proxy": "^2.1.0", "@metamask/utils": "^8.1.0", "async-mutex": "^0.2.6", diff --git a/packages/permission-controller/package.json b/packages/permission-controller/package.json index b1edf19c87..c96258c3ba 100644 --- a/packages/permission-controller/package.json +++ b/packages/permission-controller/package.json @@ -33,7 +33,7 @@ "@metamask/base-controller": "^3.2.3", "@metamask/controller-utils": "^5.0.2", "@metamask/json-rpc-engine": "^7.1.1", - "@metamask/rpc-errors": "^6.0.0", + "@metamask/rpc-errors": "^6.1.0", "@metamask/utils": "^8.1.0", "@types/deep-freeze-strict": "^1.1.0", "deep-freeze-strict": "^1.1.1", diff --git a/packages/rate-limit-controller/package.json b/packages/rate-limit-controller/package.json index e2e8ebc7a0..4cb0d567d8 100644 --- a/packages/rate-limit-controller/package.json +++ b/packages/rate-limit-controller/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "@metamask/base-controller": "^3.2.3", - "@metamask/rpc-errors": "^6.0.0", + "@metamask/rpc-errors": "^6.1.0", "immer": "^9.0.6" }, "devDependencies": { diff --git a/packages/signature-controller/package.json b/packages/signature-controller/package.json index 3e1005bdbb..ff1354cffa 100644 --- a/packages/signature-controller/package.json +++ b/packages/signature-controller/package.json @@ -34,7 +34,7 @@ "@metamask/controller-utils": "^5.0.2", "@metamask/logging-controller": "^1.0.3", "@metamask/message-manager": "^7.3.5", - "@metamask/rpc-errors": "^6.0.0", + "@metamask/rpc-errors": "^6.1.0", "@metamask/utils": "^8.1.0", "ethereumjs-util": "^7.0.10", "immer": "^9.0.6", diff --git a/packages/transaction-controller/package.json b/packages/transaction-controller/package.json index d6c50965c1..89887994b5 100644 --- a/packages/transaction-controller/package.json +++ b/packages/transaction-controller/package.json @@ -38,7 +38,7 @@ "@metamask/eth-query": "^3.0.1", "@metamask/metamask-eth-abis": "^3.0.0", "@metamask/network-controller": "^14.0.0", - "@metamask/rpc-errors": "^6.0.0", + "@metamask/rpc-errors": "^6.1.0", "@metamask/utils": "^8.1.0", "async-mutex": "^0.2.6", "eth-method-registry": "1.1.0", diff --git a/yarn.lock b/yarn.lock index 3772cf2be0..8184c8d581 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1367,7 +1367,7 @@ __metadata: dependencies: "@metamask/auto-changelog": ^3.1.0 "@metamask/base-controller": ^3.2.3 - "@metamask/rpc-errors": ^6.0.0 + "@metamask/rpc-errors": ^6.1.0 "@metamask/utils": ^8.1.0 "@types/jest": ^27.4.1 deepmerge: ^4.2.2 @@ -1413,7 +1413,7 @@ __metadata: "@metamask/metamask-eth-abis": 3.0.0 "@metamask/network-controller": ^14.0.0 "@metamask/preferences-controller": ^4.4.2 - "@metamask/rpc-errors": ^6.0.0 + "@metamask/rpc-errors": ^6.1.0 "@metamask/utils": ^8.1.0 "@types/jest": ^27.4.1 "@types/node": ^16.18.54 @@ -2011,7 +2011,7 @@ __metadata: "@metamask/eth-json-rpc-provider": ^2.1.0 "@metamask/eth-query": ^3.0.1 "@metamask/json-rpc-engine": ^7.1.1 - "@metamask/rpc-errors": ^6.0.0 + "@metamask/rpc-errors": ^6.1.0 "@metamask/swappable-obj-proxy": ^2.1.0 "@metamask/utils": ^8.1.0 "@types/jest": ^27.4.1 @@ -2113,7 +2113,7 @@ __metadata: "@metamask/base-controller": ^3.2.3 "@metamask/controller-utils": ^5.0.2 "@metamask/json-rpc-engine": ^7.1.1 - "@metamask/rpc-errors": ^6.0.0 + "@metamask/rpc-errors": ^6.1.0 "@metamask/utils": ^8.1.0 "@types/deep-freeze-strict": ^1.1.0 "@types/jest": ^27.4.1 @@ -2267,7 +2267,7 @@ __metadata: dependencies: "@metamask/auto-changelog": ^3.1.0 "@metamask/base-controller": ^3.2.3 - "@metamask/rpc-errors": ^6.0.0 + "@metamask/rpc-errors": ^6.1.0 "@types/jest": ^27.4.1 deepmerge: ^4.2.2 immer: ^9.0.6 @@ -2279,13 +2279,13 @@ __metadata: languageName: unknown linkType: soft -"@metamask/rpc-errors@npm:^6.0.0": - version: 6.0.0 - resolution: "@metamask/rpc-errors@npm:6.0.0" +"@metamask/rpc-errors@npm:^6.0.0, @metamask/rpc-errors@npm:^6.1.0": + version: 6.1.0 + resolution: "@metamask/rpc-errors@npm:6.1.0" dependencies: - "@metamask/utils": ^8.0.0 + "@metamask/utils": ^8.1.0 fast-safe-stringify: ^2.0.6 - checksum: 7e1ee1a98972266af4a34f0bbc842cdc11dc565056f0b8fbc93aa95663a7027eab8ff1fecbe3e09c38a1dc199f8219a6c69b2237015b2fdb8de0e5b35027c3f8 + checksum: 9f4821d804e2fcaa8987b0958d02c6d829b7c7db49740c811cb593f381d0c4b00dabb7f1802907f1b2f6126f7c0d83ec34219183d29650f5d24df014ac72906a languageName: node linkType: hard @@ -2401,7 +2401,7 @@ __metadata: "@metamask/keyring-controller": ^8.0.2 "@metamask/logging-controller": ^1.0.3 "@metamask/message-manager": ^7.3.5 - "@metamask/rpc-errors": ^6.0.0 + "@metamask/rpc-errors": ^6.1.0 "@metamask/utils": ^8.1.0 "@types/jest": ^27.4.1 deepmerge: ^4.2.2 @@ -2626,7 +2626,7 @@ __metadata: "@metamask/eth-query": ^3.0.1 "@metamask/metamask-eth-abis": ^3.0.0 "@metamask/network-controller": ^14.0.0 - "@metamask/rpc-errors": ^6.0.0 + "@metamask/rpc-errors": ^6.1.0 "@metamask/utils": ^8.1.0 "@types/jest": ^27.4.1 "@types/node": ^16.18.54