From 11947438da2611346c76a8617ea593a34147c35e Mon Sep 17 00:00:00 2001 From: Mathieu Artu Date: Wed, 18 Dec 2024 13:01:16 +0100 Subject: [PATCH 1/9] test: verify core PR 5078 --- package.json | 2 +- yarn.lock | 109 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 70 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index db621739117..c1eec01a58c 100644 --- a/package.json +++ b/package.json @@ -187,7 +187,7 @@ "@metamask/post-message-stream": "^8.0.0", "@metamask/ppom-validator": "0.36.0", "@metamask/preferences-controller": "^15.0.1", - "@metamask/profile-sync-controller": "^3.0.0", + "@metamask/profile-sync-controller": "npm:@metamask-previews/profile-sync-controller@3.1.1-preview-e218ba33", "@metamask/react-native-actionsheet": "2.4.2", "@metamask/react-native-button": "^3.0.0", "@metamask/react-native-payments": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 1b9e5218c5a..08aefe72a66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4521,10 +4521,10 @@ resolved "https://registry.yarnpkg.com/@metamask/eslint-plugin-design-tokens/-/eslint-plugin-design-tokens-1.1.0.tgz#c9d4471f04f62bfb307aa261d11b7a674eb27961" integrity sha512-33BJTEl96wXrkNdydNgTnfz3C0XP6/FdYbKzNnM8wT3XeVOkF/EOt8oiY8X4stXlNKDJtKyQchxENgZwS8sl9w== -"@metamask/eth-block-tracker@^11.0.1", "@metamask/eth-block-tracker@^11.0.2": - version "11.0.2" - resolved "https://registry.yarnpkg.com/@metamask/eth-block-tracker/-/eth-block-tracker-11.0.2.tgz#7890a4430bd6a92577585a66d7958771bfd88ec8" - integrity sha512-R1J3n2WY3PyEfYELc45MVFw7+6iKu7O3S/nBU0icmM3Q2mVqDMpctF5Z5pAZDYYEW35h7tTU2KJfUb1DrXzWcg== +"@metamask/eth-block-tracker@^11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@metamask/eth-block-tracker/-/eth-block-tracker-11.0.3.tgz#0e70aaa63f90c2fb18a308a9d67ca750641cde28" + integrity sha512-Lvm6oZcL5vRGnyulFVde5kbS5/IQ2hwmolYUiyZVqTPQGoKX5AdGAIJvAwXnXVgMMhNw177tYu//jBy78M13hA== dependencies: "@metamask/eth-json-rpc-provider" "^4.1.5" "@metamask/safe-event-emitter" "^3.1.1" @@ -4591,12 +4591,12 @@ pify "^3.0.0" safe-stable-stringify "^2.3.2" -"@metamask/eth-json-rpc-middleware@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@metamask/eth-json-rpc-middleware/-/eth-json-rpc-middleware-15.0.0.tgz#167288ad4618438af9d1bda75d238cb0facfde3f" - integrity sha512-RkmaPQPWGH1qggaq0sStwVIeamiJOjf/2jBJfbX78r/nDCai8ddY/zHpATJr42SvtRYD0JrCPjo6v356IDzjQw== +"@metamask/eth-json-rpc-middleware@^15.0.1": + version "15.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-json-rpc-middleware/-/eth-json-rpc-middleware-15.0.1.tgz#65a4382bdf87fa6c84fe9dc97a4d9c40b47bcbcb" + integrity sha512-AstO4eE6HmAn81pYyTeCIiFGYKJIRY2x7dWENF/IBkxYrf7eg90mFr1zjldZiacMeEMnkgzd9/tipanWGXT+wA== dependencies: - "@metamask/eth-block-tracker" "^11.0.1" + "@metamask/eth-block-tracker" "^11.0.3" "@metamask/eth-json-rpc-provider" "^4.1.5" "@metamask/eth-sig-util" "^7.0.3" "@metamask/json-rpc-engine" "^10.0.0" @@ -4883,10 +4883,20 @@ uuid "^9.0.1" webextension-polyfill "^0.12.0" -"@metamask/keyring-controller@^19.0.1": - version "19.0.1" - resolved "https://registry.yarnpkg.com/@metamask/keyring-controller/-/keyring-controller-19.0.1.tgz#6fee40a46a780a720f4c864ea779673569be06a7" - integrity sha512-6dNQBaJanAKEg7V0ksnWyqxHY1r3YCe910OF6DpnN97NZIPx3tba2zy32jbQWGPG6XaybfTG1xdUBtdYdeTpQA== +"@metamask/keyring-api@^12.0.0": + version "12.0.0" + resolved "https://registry.yarnpkg.com/@metamask/keyring-api/-/keyring-api-12.0.0.tgz#c36d2dfeeb175c69ba8b8a670a452724b3c5e51b" + integrity sha512-Dw5p5fYeA9AOoC+9gYaDv+xsh7sPm24mzDEiHzl8xmxsjS7uvhA41aDr36IRL1/HOoI1C8lLfExx5DVPFOGo9w== + dependencies: + "@metamask/keyring-utils" "^1.0.0" + "@metamask/superstruct" "^3.1.0" + "@metamask/utils" "^9.3.0" + bech32 "^2.0.0" + +"@metamask/keyring-controller@^19.0.1", "@metamask/keyring-controller@^19.0.2": + version "19.0.2" + resolved "https://registry.yarnpkg.com/@metamask/keyring-controller/-/keyring-controller-19.0.2.tgz#e929a7816dfc1cd4de9222f63b83f064b0149c2d" + integrity sha512-w8H7z/+3TlnHq/6IkxzyEYNqbItwe2wMRufZ7kNLIRNCOGGJ1o+XoQB40aUYH9YH+YOb8ptn0ezzSK4G89fq0g== dependencies: "@ethereumjs/util" "^8.1.0" "@keystonehq/metamask-airgapped-keyring" "^0.14.1" @@ -4895,13 +4905,32 @@ "@metamask/eth-hd-keyring" "^7.0.4" "@metamask/eth-sig-util" "^8.0.0" "@metamask/eth-simple-keyring" "^6.0.5" - "@metamask/keyring-api" "^10.1.0" - "@metamask/message-manager" "^11.0.2" + "@metamask/keyring-api" "^12.0.0" + "@metamask/keyring-internal-api" "^1.0.0" + "@metamask/message-manager" "^11.0.3" "@metamask/utils" "^10.0.0" async-mutex "^0.5.0" ethereumjs-wallet "^1.0.1" immer "^9.0.6" +"@metamask/keyring-internal-api@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@metamask/keyring-internal-api/-/keyring-internal-api-1.0.0.tgz#589ead606e5081b5d3298eda4792aa7adf33e888" + integrity sha512-4CZ3EV2JoFgLwcGNGC36jk8MTTSDkmqe/gnvYzQ4yRKrtvj094eXbL9abHgisgP6W7c5DNb9bP3i2jWFMmJnlA== + dependencies: + "@metamask/keyring-api" "^12.0.0" + "@metamask/keyring-utils" "^1.0.0" + "@metamask/superstruct" "^3.1.0" + "@metamask/utils" "^9.3.0" + +"@metamask/keyring-utils@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@metamask/keyring-utils/-/keyring-utils-1.0.0.tgz#06a5df63c57304811ec56ac6e250c4628da435b8" + integrity sha512-adxVCKPHnai4w1+ZUNwL0T2DfxMpjcQucMKfa74oQuxoqjbTBDKeW6FzJwRzFspYEuRMhOLFOMUuZQQMgyF1OQ== + dependencies: + "@metamask/superstruct" "^3.1.0" + "@metamask/utils" "^9.3.0" + "@metamask/logging-controller@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@metamask/logging-controller/-/logging-controller-6.0.1.tgz#cfe858e91ba6fa490ebcf4e50bebd5f6dee0417e" @@ -4911,17 +4940,17 @@ "@metamask/controller-utils" "^11.3.0" uuid "^8.3.2" -"@metamask/message-manager@^11.0.2": - version "11.0.2" - resolved "https://registry.yarnpkg.com/@metamask/message-manager/-/message-manager-11.0.2.tgz#805ac8d2184c56d973a787bdc7c9571024348ce6" - integrity sha512-j8DgWn7ACfwZtLFqeAYx4U/TquBEtcPYa81LjhoZYK39W/MQVr4ZKAmGEKxKRruMLz50GX7ciOEZU9SBtPBAog== +"@metamask/message-manager@^11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@metamask/message-manager/-/message-manager-11.0.3.tgz#7fc1a41566d7611dc99124b66dcbc29a0dc58efc" + integrity sha512-y3AnzPQvzAE6GWytmdfftp5vr1LepA3L02iFS4PFj0Xk+t1d42IjPAdd7XC/wWFJ+tGasrSDW6T0PKXoItCqEA== dependencies: "@metamask/base-controller" "^7.0.2" "@metamask/controller-utils" "^11.4.4" "@metamask/eth-sig-util" "^8.0.0" "@metamask/utils" "^10.0.0" "@types/uuid" "^8.3.0" - jsonschema "^1.2.4" + jsonschema "^1.4.1" uuid "^8.3.2" "@metamask/message-signing-snap@^0.3.3": @@ -4947,21 +4976,21 @@ resolved "https://registry.yarnpkg.com/@metamask/mobile-provider/-/mobile-provider-3.0.0.tgz#8a6a5a0874c8cbe4b468f63dfc57117d207f9595" integrity sha512-XwFJk0rd9lAZR5xS3VC7ypEhD7DvZR2gi2Ch6PHnODIqeS9Te3OdVKK5+jHI4his8v/zs6LWdFdlRtx5/jL96w== -"@metamask/network-controller@^22.1.0": - version "22.1.0" - resolved "https://registry.yarnpkg.com/@metamask/network-controller/-/network-controller-22.1.0.tgz#b4c81a31fc52147d12131bfb16c77c1c1cfbe43c" - integrity sha512-wvP2HUBQCWvlvBkuhqMNtd6+D/cJa343ABFLfCLNrQsk8QjdHPFw/QDIqC+QXTPxyrPWw9GL5akaLb//rmO1NA== +"@metamask/network-controller@^22.1.0", "@metamask/network-controller@^22.1.1": + version "22.1.1" + resolved "https://registry.yarnpkg.com/@metamask/network-controller/-/network-controller-22.1.1.tgz#6c3b5aef07ae66ae4cec44a62dbbd7df4421f971" + integrity sha512-NTIZjRuPqOynPfPDqy/tPc8ZeKnD2ys8i2ihxq1ODHwSAHBwQ0gogNHBda7PMLaKjuuPkfmh2EzkALiH07MKSg== dependencies: "@metamask/base-controller" "^7.0.2" "@metamask/controller-utils" "^11.4.4" - "@metamask/eth-block-tracker" "^11.0.2" + "@metamask/eth-block-tracker" "^11.0.3" "@metamask/eth-json-rpc-infura" "^10.0.0" - "@metamask/eth-json-rpc-middleware" "^15.0.0" + "@metamask/eth-json-rpc-middleware" "^15.0.1" "@metamask/eth-json-rpc-provider" "^4.1.6" "@metamask/eth-query" "^4.0.0" "@metamask/json-rpc-engine" "^10.0.1" "@metamask/rpc-errors" "^7.0.1" - "@metamask/swappable-obj-proxy" "^2.2.0" + "@metamask/swappable-obj-proxy" "^2.3.0" "@metamask/utils" "^10.0.0" async-mutex "^0.5.0" fast-deep-equal "^3.1.3" @@ -5105,15 +5134,15 @@ "@metamask/base-controller" "^7.0.2" "@metamask/controller-utils" "^11.4.4" -"@metamask/profile-sync-controller@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@metamask/profile-sync-controller/-/profile-sync-controller-3.0.0.tgz#52cdb1f370ba6c8ce580fb9f9d1e9a5b1f8b9014" - integrity sha512-OlNOlWcHLlX4QNKR/J0O4IwgtO46EYA3OPzntmDk7zlFtd3I61qooE3EnRWH6aYPQsf7GcsM2aP44cKVJyV4mg== +"@metamask/profile-sync-controller@npm:@metamask-previews/profile-sync-controller@3.1.1-preview-e218ba33": + version "3.1.1-preview-e218ba33" + resolved "https://registry.yarnpkg.com/@metamask-previews/profile-sync-controller/-/profile-sync-controller-3.1.1-preview-e218ba33.tgz#87d65c3130d41d60208965486d0c4a895b46c2be" + integrity sha512-dUtKY3XJSrrs6zd0xqkVJeuYpB7CZVqkPUhBxHwrzxc27XVvccpmQiFtxyAQO4LRfpAL134nP1nneOa2rKSZ4A== dependencies: "@metamask/base-controller" "^7.0.2" - "@metamask/keyring-api" "^10.1.0" - "@metamask/keyring-controller" "^19.0.1" - "@metamask/network-controller" "^22.1.0" + "@metamask/keyring-api" "^12.0.0" + "@metamask/keyring-controller" "^19.0.2" + "@metamask/network-controller" "^22.1.1" "@metamask/snaps-sdk" "^6.7.0" "@metamask/snaps-utils" "^8.3.0" "@noble/ciphers" "^0.5.2" @@ -5419,10 +5448,10 @@ resolved "https://registry.yarnpkg.com/@metamask/superstruct/-/superstruct-3.1.0.tgz#148f786a674fba3ac885c1093ab718515bf7f648" integrity sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA== -"@metamask/swappable-obj-proxy@^2.1.0", "@metamask/swappable-obj-proxy@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@metamask/swappable-obj-proxy/-/swappable-obj-proxy-2.2.0.tgz#31b8e0ce57e28bf9847b3b24b214996f7748cc99" - integrity sha512-0OjVwQtrrPFRGipw64yDUQA0CUXCK161LWCv2KlTTDZD8BKeWSNb0gbnpDI7HvhsJ0gki5gScZj1hF3ShDnBzA== +"@metamask/swappable-obj-proxy@^2.1.0", "@metamask/swappable-obj-proxy@^2.2.0", "@metamask/swappable-obj-proxy@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@metamask/swappable-obj-proxy/-/swappable-obj-proxy-2.3.0.tgz#276819d24f1b411c768441efb6098c1743d6f67a" + integrity sha512-+VFE6wVWve86SLiUI3jyhJjizUezpOnwvRyem7EP79Mml+oSm48gQ4W8QqeQqTugbrlCsxtFI4QNEPotQsll6Q== "@metamask/swaps-controller@^11.0.0": version "11.0.0" @@ -5470,7 +5499,7 @@ lodash "^4.17.21" uuid "^8.3.2" -"@metamask/utils@^10.0.0", "@metamask/utils@^10.0.1", "@metamask/utils@^3.4.1", "@metamask/utils@^5.0.1", "@metamask/utils@^5.0.2", "@metamask/utils@^8.2.0", "@metamask/utils@^8.3.0", "@metamask/utils@^9.0.0", "@metamask/utils@^9.1.0", "@metamask/utils@^9.2.1": +"@metamask/utils@^10.0.0", "@metamask/utils@^10.0.1", "@metamask/utils@^3.4.1", "@metamask/utils@^5.0.1", "@metamask/utils@^5.0.2", "@metamask/utils@^8.2.0", "@metamask/utils@^8.3.0", "@metamask/utils@^9.0.0", "@metamask/utils@^9.1.0", "@metamask/utils@^9.2.1", "@metamask/utils@^9.3.0": version "10.0.1" resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-10.0.1.tgz#a765f96c20e35fc51c068fb9f88a3332b40b215e" integrity sha512-zHgAitJtRwviVVFnRUA2PLRMaAwatr3jiHgiH7mPicJaeSK4ma01aGR4fHy0iy5tlVo1ZiioTmJ1Hbp8FZ6pSg== @@ -20542,7 +20571,7 @@ jsonpath-plus@^7.2.0: resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899" integrity sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA== -jsonschema@^1.2.4, jsonschema@^1.4.1: +jsonschema@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== From d81846d8570909dc62030fb0358ccb2c1e09877b Mon Sep 17 00:00:00 2001 From: Mathieu Artu Date: Wed, 18 Dec 2024 13:54:32 +0100 Subject: [PATCH 2/9] fix: lint --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c1eec01a58c..0adcdb86ba1 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ "@metamask/keyring-controller": "^19.0.1", "@metamask/logging-controller": "^6.0.1", "@metamask/message-signing-snap": "^0.3.3", - "@metamask/network-controller": "^22.1.0", + "@metamask/network-controller": "^22.1.1", "@metamask/notification-services-controller": "^0.15.0", "@metamask/permission-controller": "^11.0.0", "@metamask/phishing-controller": "^12.0.3", diff --git a/yarn.lock b/yarn.lock index 08aefe72a66..03c7a186642 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4976,7 +4976,7 @@ resolved "https://registry.yarnpkg.com/@metamask/mobile-provider/-/mobile-provider-3.0.0.tgz#8a6a5a0874c8cbe4b468f63dfc57117d207f9595" integrity sha512-XwFJk0rd9lAZR5xS3VC7ypEhD7DvZR2gi2Ch6PHnODIqeS9Te3OdVKK5+jHI4his8v/zs6LWdFdlRtx5/jL96w== -"@metamask/network-controller@^22.1.0", "@metamask/network-controller@^22.1.1": +"@metamask/network-controller@^22.1.1": version "22.1.1" resolved "https://registry.yarnpkg.com/@metamask/network-controller/-/network-controller-22.1.1.tgz#6c3b5aef07ae66ae4cec44a62dbbd7df4421f971" integrity sha512-NTIZjRuPqOynPfPDqy/tPc8ZeKnD2ys8i2ihxq1ODHwSAHBwQ0gogNHBda7PMLaKjuuPkfmh2EzkALiH07MKSg== From 52b3b1e9ef1b167b8fd6af5bf643d9dd50d5889e Mon Sep 17 00:00:00 2001 From: Mathieu Artu Date: Wed, 18 Dec 2024 14:06:25 +0100 Subject: [PATCH 3/9] fix: yarn.lock --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0adcdb86ba1..c1eec01a58c 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ "@metamask/keyring-controller": "^19.0.1", "@metamask/logging-controller": "^6.0.1", "@metamask/message-signing-snap": "^0.3.3", - "@metamask/network-controller": "^22.1.1", + "@metamask/network-controller": "^22.1.0", "@metamask/notification-services-controller": "^0.15.0", "@metamask/permission-controller": "^11.0.0", "@metamask/phishing-controller": "^12.0.3", diff --git a/yarn.lock b/yarn.lock index 03c7a186642..08aefe72a66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4976,7 +4976,7 @@ resolved "https://registry.yarnpkg.com/@metamask/mobile-provider/-/mobile-provider-3.0.0.tgz#8a6a5a0874c8cbe4b468f63dfc57117d207f9595" integrity sha512-XwFJk0rd9lAZR5xS3VC7ypEhD7DvZR2gi2Ch6PHnODIqeS9Te3OdVKK5+jHI4his8v/zs6LWdFdlRtx5/jL96w== -"@metamask/network-controller@^22.1.1": +"@metamask/network-controller@^22.1.0", "@metamask/network-controller@^22.1.1": version "22.1.1" resolved "https://registry.yarnpkg.com/@metamask/network-controller/-/network-controller-22.1.1.tgz#6c3b5aef07ae66ae4cec44a62dbbd7df4421f971" integrity sha512-NTIZjRuPqOynPfPDqy/tPc8ZeKnD2ys8i2ihxq1ODHwSAHBwQ0gogNHBda7PMLaKjuuPkfmh2EzkALiH07MKSg== From 78cab4a52f6ff3226f23e8a89648603150072fd0 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Wed, 18 Dec 2024 09:48:05 -0700 Subject: [PATCH 4/9] Prevent Engine.destroy test intermittent failure Some unit tests for the Engine do not properly wait for the NetworkController provider to be fully initialized after initializing the engine before attempting to destroy it. This prevents NetworkController's `lookupNetwork` from functioning because it removes an event listener that NetworkController had previously created, causing an error. This commit patches NetworkController to not throw if the controller is destroyed before `lookupNetwork` has a chance to remove the event listener. It also updates Engine to create a promise that resolves when NetworkController's provider finishes initialization. This promise is then awaited in `Engine.destroyEngineInstance`. Finally this commit also ensures that any calls to `Engine.destroyEngineInstance` in tests are properly awaited. --- app/core/Engine/Engine.test.ts | 8 +++-- app/core/Engine/Engine.ts | 18 +++++++++++ .../@metamask+network-controller+22.1.0.patch | 30 +++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 patches/@metamask+network-controller+22.1.0.patch diff --git a/app/core/Engine/Engine.test.ts b/app/core/Engine/Engine.test.ts index 5af5d8965c8..36ba3aff3fc 100644 --- a/app/core/Engine/Engine.test.ts +++ b/app/core/Engine/Engine.test.ts @@ -108,7 +108,9 @@ describe('Engine', () => { describe('getTotalFiatAccountBalance', () => { let engine: EngineClass; - afterEach(() => engine?.destroyEngineInstance()); + afterEach(async () => { + await engine?.destroyEngineInstance(); + }); const selectedAddress = '0x9DeE4BF1dE9E3b930E511Db5cEBEbC8d6F855Db0'; const chainId: Hex = '0x1'; @@ -372,8 +374,8 @@ describe('Transaction event handlers', () => { jest.spyOn(store, 'getState').mockReturnValue({} as RootState); }); - afterEach(() => { - engine?.destroyEngineInstance(); + afterEach(async () => { + await engine?.destroyEngineInstance(); jest.clearAllMocks(); }); diff --git a/app/core/Engine/Engine.ts b/app/core/Engine/Engine.ts index 95c23de7ba2..e9912233923 100644 --- a/app/core/Engine/Engine.ts +++ b/app/core/Engine/Engine.ts @@ -268,6 +268,8 @@ export class Engine { keyringController: KeyringController; + #promiseForNetworkProviderInitialization: Promise; + /** * Creates a CoreController instance */ @@ -333,6 +335,21 @@ export class Engine { }; const networkController = new NetworkController(networkControllerOpts); + this.#promiseForNetworkProviderInitialization = new Promise( + (resolve) => { + this.controllerMessenger.subscribe( + 'NetworkController:stateChange', + (networksMetadata: NetworkState['networksMetadata']) => { + // `networksMetadata` starts out empty and is then updated for the + // currently selected network, which is Mainnet by default + if ('mainnet' in networksMetadata) { + resolve(); + } + }, + (networkControllerState) => networkControllerState.networksMetadata, + ); + }, + ); networkController.initializeProvider(); const assetsContractController = new AssetsContractController({ @@ -1948,6 +1965,7 @@ export class Engine { } async destroyEngineInstance() { + await this.#promiseForNetworkProviderInitialization; // TODO: Replace "any" with type // eslint-disable-next-line @typescript-eslint/no-explicit-any Object.values(this.context).forEach((controller: any) => { diff --git a/patches/@metamask+network-controller+22.1.0.patch b/patches/@metamask+network-controller+22.1.0.patch new file mode 100644 index 00000000000..0158b455da7 --- /dev/null +++ b/patches/@metamask+network-controller+22.1.0.patch @@ -0,0 +1,30 @@ +diff --git a/node_modules/@metamask/network-controller/dist/NetworkController.cjs b/node_modules/@metamask/network-controller/dist/NetworkController.cjs +index cc9793f..b94112a 100644 +--- a/node_modules/@metamask/network-controller/dist/NetworkController.cjs ++++ b/node_modules/@metamask/network-controller/dist/NetworkController.cjs +@@ -525,7 +525,11 @@ class NetworkController extends base_controller_1.BaseController { + let networkChanged = false; + const listener = () => { + networkChanged = true; +- this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); ++ try { ++ this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); ++ } catch { ++ // The controller may have been destroyed, so don't worry about it ++ } + }; + this.messagingSystem.subscribe('NetworkController:networkDidChange', listener); + let updatedNetworkStatus; +@@ -575,7 +579,11 @@ class NetworkController extends base_controller_1.BaseController { + // in the process of being called, so we don't need to go further. + return; + } +- this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); ++ try { ++ this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); ++ } catch { ++ // The controller may have been destroyed, so don't worry about it ++ } + this.update((state) => { + const meta = state.networksMetadata[state.selectedNetworkClientId]; + meta.status = updatedNetworkStatus; From 52f4433e779eb48ed3cf75bb8f2e95723cb03b61 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Wed, 18 Dec 2024 12:52:24 -0700 Subject: [PATCH 5/9] Be more specific about catching the error --- .../@metamask+network-controller+22.1.0.patch | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/patches/@metamask+network-controller+22.1.0.patch b/patches/@metamask+network-controller+22.1.0.patch index 0158b455da7..112add5aa58 100644 --- a/patches/@metamask+network-controller+22.1.0.patch +++ b/patches/@metamask+network-controller+22.1.0.patch @@ -1,29 +1,47 @@ diff --git a/node_modules/@metamask/network-controller/dist/NetworkController.cjs b/node_modules/@metamask/network-controller/dist/NetworkController.cjs -index cc9793f..b94112a 100644 +index cc9793f..e7334e4 100644 --- a/node_modules/@metamask/network-controller/dist/NetworkController.cjs +++ b/node_modules/@metamask/network-controller/dist/NetworkController.cjs -@@ -525,7 +525,11 @@ class NetworkController extends base_controller_1.BaseController { +@@ -525,7 +525,20 @@ class NetworkController extends base_controller_1.BaseController { let networkChanged = false; const listener = () => { networkChanged = true; - this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); + try { + this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); -+ } catch { -+ // The controller may have been destroyed, so don't worry about it ++ } catch (error) { ++ if ( ++ typeof error === 'object' && ++ error !== null && ++ 'message' in error && ++ error.message === 'Subscription not found for event: NetworkController:networkDidChange' ++ ) { ++ // The controller may have been destroyed, so don't worry about it ++ } else { ++ throw error; ++ } + } }; this.messagingSystem.subscribe('NetworkController:networkDidChange', listener); let updatedNetworkStatus; -@@ -575,7 +579,11 @@ class NetworkController extends base_controller_1.BaseController { +@@ -575,7 +588,20 @@ class NetworkController extends base_controller_1.BaseController { // in the process of being called, so we don't need to go further. return; } - this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); + try { + this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); -+ } catch { -+ // The controller may have been destroyed, so don't worry about it ++ } catch (error) { ++ if ( ++ typeof error === 'object' && ++ error !== null && ++ 'message' in error && ++ error.message === 'Subscription not found for event: NetworkController:networkDidChange' ++ ) { ++ // The controller may have been destroyed, so don't worry about it ++ } else { ++ throw error; ++ } + } this.update((state) => { const meta = state.networksMetadata[state.selectedNetworkClientId]; From aa8b0706a4f21913e8010ed3e5c7f41cae994f10 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Wed, 18 Dec 2024 13:03:38 -0700 Subject: [PATCH 6/9] No need to wait for provider initialization --- app/core/Engine/Engine.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/app/core/Engine/Engine.ts b/app/core/Engine/Engine.ts index e9912233923..95c23de7ba2 100644 --- a/app/core/Engine/Engine.ts +++ b/app/core/Engine/Engine.ts @@ -268,8 +268,6 @@ export class Engine { keyringController: KeyringController; - #promiseForNetworkProviderInitialization: Promise; - /** * Creates a CoreController instance */ @@ -335,21 +333,6 @@ export class Engine { }; const networkController = new NetworkController(networkControllerOpts); - this.#promiseForNetworkProviderInitialization = new Promise( - (resolve) => { - this.controllerMessenger.subscribe( - 'NetworkController:stateChange', - (networksMetadata: NetworkState['networksMetadata']) => { - // `networksMetadata` starts out empty and is then updated for the - // currently selected network, which is Mainnet by default - if ('mainnet' in networksMetadata) { - resolve(); - } - }, - (networkControllerState) => networkControllerState.networksMetadata, - ); - }, - ); networkController.initializeProvider(); const assetsContractController = new AssetsContractController({ @@ -1965,7 +1948,6 @@ export class Engine { } async destroyEngineInstance() { - await this.#promiseForNetworkProviderInitialization; // TODO: Replace "any" with type // eslint-disable-next-line @typescript-eslint/no-explicit-any Object.values(this.context).forEach((controller: any) => { From 2587cbaff0f9e182fedf758b1e2fb0620a23d71f Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Wed, 18 Dec 2024 13:06:09 -0700 Subject: [PATCH 7/9] No need to await destroy in tests either --- app/core/Engine/Engine.test.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/core/Engine/Engine.test.ts b/app/core/Engine/Engine.test.ts index 36ba3aff3fc..5af5d8965c8 100644 --- a/app/core/Engine/Engine.test.ts +++ b/app/core/Engine/Engine.test.ts @@ -108,9 +108,7 @@ describe('Engine', () => { describe('getTotalFiatAccountBalance', () => { let engine: EngineClass; - afterEach(async () => { - await engine?.destroyEngineInstance(); - }); + afterEach(() => engine?.destroyEngineInstance()); const selectedAddress = '0x9DeE4BF1dE9E3b930E511Db5cEBEbC8d6F855Db0'; const chainId: Hex = '0x1'; @@ -374,8 +372,8 @@ describe('Transaction event handlers', () => { jest.spyOn(store, 'getState').mockReturnValue({} as RootState); }); - afterEach(async () => { - await engine?.destroyEngineInstance(); + afterEach(() => { + engine?.destroyEngineInstance(); jest.clearAllMocks(); }); From 35980159f3124ebeb8db07e93d610409421df7f1 Mon Sep 17 00:00:00 2001 From: Mathieu Artu Date: Thu, 19 Dec 2024 10:06:49 +0100 Subject: [PATCH 8/9] fix: add missing account sync state --- app/util/logs/__snapshots__/index.test.ts.snap | 1 + app/util/test/initial-background-state.json | 1 + 2 files changed, 2 insertions(+) diff --git a/app/util/logs/__snapshots__/index.test.ts.snap b/app/util/logs/__snapshots__/index.test.ts.snap index 197b81ca95f..04e5f381aa0 100644 --- a/app/util/logs/__snapshots__/index.test.ts.snap +++ b/app/util/logs/__snapshots__/index.test.ts.snap @@ -345,6 +345,7 @@ exports[`logs :: generateStateLogs generates a valid json export 1`] = ` }, "UserStorageController": { "hasAccountSyncingSyncedAtLeastOnce": false, + "isAccountSyncingInProgress": false, "isAccountSyncingReadyToBeDispatched": false, "isProfileSyncingEnabled": true, "isProfileSyncingUpdateLoading": false, diff --git a/app/util/test/initial-background-state.json b/app/util/test/initial-background-state.json index 0191af34f02..53276453bee 100644 --- a/app/util/test/initial-background-state.json +++ b/app/util/test/initial-background-state.json @@ -352,6 +352,7 @@ "UserStorageController": { "hasAccountSyncingSyncedAtLeastOnce": false, "isAccountSyncingReadyToBeDispatched": false, + "isAccountSyncingInProgress": false, "isProfileSyncingEnabled": true, "isProfileSyncingUpdateLoading": false } From 508c777f023919f1e9c2e521f871800b7aca2395 Mon Sep 17 00:00:00 2001 From: Mathieu Artu Date: Thu, 9 Jan 2025 09:34:56 +0100 Subject: [PATCH 9/9] fix: use NetworkController preview version --- package.json | 2 +- .../@metamask+network-controller+22.1.0.patch | 48 -------- yarn.lock | 116 +++++++++++------- 3 files changed, 75 insertions(+), 91 deletions(-) delete mode 100644 patches/@metamask+network-controller+22.1.0.patch diff --git a/package.json b/package.json index e16c08380f4..90fe9fa64ee 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "@metamask/keyring-controller": "^19.0.1", "@metamask/logging-controller": "^6.0.1", "@metamask/message-signing-snap": "^0.3.3", - "@metamask/network-controller": "^22.1.0", + "@metamask/network-controller": "npm:@metamask-previews/network-controller@22.1.1-preview-ffa69e9", "@metamask/notification-services-controller": "^0.15.0", "@metamask/permission-controller": "^11.0.0", "@metamask/phishing-controller": "^12.0.3", diff --git a/patches/@metamask+network-controller+22.1.0.patch b/patches/@metamask+network-controller+22.1.0.patch deleted file mode 100644 index 112add5aa58..00000000000 --- a/patches/@metamask+network-controller+22.1.0.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/node_modules/@metamask/network-controller/dist/NetworkController.cjs b/node_modules/@metamask/network-controller/dist/NetworkController.cjs -index cc9793f..e7334e4 100644 ---- a/node_modules/@metamask/network-controller/dist/NetworkController.cjs -+++ b/node_modules/@metamask/network-controller/dist/NetworkController.cjs -@@ -525,7 +525,20 @@ class NetworkController extends base_controller_1.BaseController { - let networkChanged = false; - const listener = () => { - networkChanged = true; -- this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); -+ try { -+ this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); -+ } catch (error) { -+ if ( -+ typeof error === 'object' && -+ error !== null && -+ 'message' in error && -+ error.message === 'Subscription not found for event: NetworkController:networkDidChange' -+ ) { -+ // The controller may have been destroyed, so don't worry about it -+ } else { -+ throw error; -+ } -+ } - }; - this.messagingSystem.subscribe('NetworkController:networkDidChange', listener); - let updatedNetworkStatus; -@@ -575,7 +588,20 @@ class NetworkController extends base_controller_1.BaseController { - // in the process of being called, so we don't need to go further. - return; - } -- this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); -+ try { -+ this.messagingSystem.unsubscribe('NetworkController:networkDidChange', listener); -+ } catch (error) { -+ if ( -+ typeof error === 'object' && -+ error !== null && -+ 'message' in error && -+ error.message === 'Subscription not found for event: NetworkController:networkDidChange' -+ ) { -+ // The controller may have been destroyed, so don't worry about it -+ } else { -+ throw error; -+ } -+ } - this.update((state) => { - const meta = state.networksMetadata[state.selectedNetworkClientId]; - meta.status = updatedNetworkStatus; diff --git a/yarn.lock b/yarn.lock index f24bb21a2c1..2b25efeb6cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4377,6 +4377,14 @@ "@metamask/superstruct" "^3.1.0" "@metamask/utils" "^9.0.0" +"@metamask/abi-utils@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@metamask/abi-utils/-/abi-utils-3.0.0.tgz#2eab9cb895922b94305364d9111b6dde724f6f9b" + integrity sha512-a/l0DiSIr7+CBYVpHygUa3ztSlYLFCQMsklLna+t6qmNY9+eIO5TedNxhyIyvaJ+4cN7TLy0NQFbp9FV3X2ktg== + dependencies: + "@metamask/superstruct" "^3.1.0" + "@metamask/utils" "^11.0.1" + "@metamask/accounts-controller@^20.0.1": version "20.0.1" resolved "https://registry.yarnpkg.com/@metamask/accounts-controller/-/accounts-controller-20.0.1.tgz#6f3dc905418ad75e44fce830b0363a585cce2ea8" @@ -4444,10 +4452,10 @@ single-call-balance-checker-abi "^1.0.0" uuid "^8.3.2" -"@metamask/base-controller@^7.0.1", "@metamask/base-controller@^7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@metamask/base-controller/-/base-controller-7.0.2.tgz#bf908858215cd4f7d072b3b0f7f0946cf886ee49" - integrity sha512-zeZ5QPKedGT/r2M1NsT4lE7z4u9ciSNcOXG2vUdmfA+QT9YLwIm5+t56UGku3ZTjKGxDn9Ukca3BEkRc57Gt0A== +"@metamask/base-controller@^7.0.1", "@metamask/base-controller@^7.0.2", "@metamask/base-controller@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@metamask/base-controller/-/base-controller-7.1.0.tgz#b0dba552cb72a27fb5ac0b801458006a4ab04c42" + integrity sha512-qUZXuyjy51o73QpkfgwvFiyahi0MRE0u33DGnC6eS34eww7JWwzwA+jbPFSWYj2nVGlR/ZQ1uZR7r1yCxcpzvg== dependencies: "@metamask/utils" "^10.0.0" immer "^9.0.6" @@ -4522,14 +4530,14 @@ resolved "https://registry.yarnpkg.com/@metamask/eslint-plugin-design-tokens/-/eslint-plugin-design-tokens-1.1.0.tgz#c9d4471f04f62bfb307aa261d11b7a674eb27961" integrity sha512-33BJTEl96wXrkNdydNgTnfz3C0XP6/FdYbKzNnM8wT3XeVOkF/EOt8oiY8X4stXlNKDJtKyQchxENgZwS8sl9w== -"@metamask/eth-block-tracker@^11.0.3": - version "11.0.3" - resolved "https://registry.yarnpkg.com/@metamask/eth-block-tracker/-/eth-block-tracker-11.0.3.tgz#0e70aaa63f90c2fb18a308a9d67ca750641cde28" - integrity sha512-Lvm6oZcL5vRGnyulFVde5kbS5/IQ2hwmolYUiyZVqTPQGoKX5AdGAIJvAwXnXVgMMhNw177tYu//jBy78M13hA== +"@metamask/eth-block-tracker@^11.0.3", "@metamask/eth-block-tracker@^11.0.4": + version "11.0.4" + resolved "https://registry.yarnpkg.com/@metamask/eth-block-tracker/-/eth-block-tracker-11.0.4.tgz#20fc468c9ed6d8d61da514184e546a9faee5fa64" + integrity sha512-t/em7d7lmV6FqU/4bPRaImhYQPp7ZXy2mYzh/3FocYGAhSOqjL107uqLb5lds8EdIp1rqO4Hm+NgNhgKI8yhIw== dependencies: "@metamask/eth-json-rpc-provider" "^4.1.5" "@metamask/safe-event-emitter" "^3.1.1" - "@metamask/utils" "^9.1.0" + "@metamask/utils" "^11.0.1" json-rpc-random-id "^1.0.1" pify "^5.0.0" @@ -4577,32 +4585,32 @@ "@metamask/rpc-errors" "^7.0.0" "@metamask/utils" "^9.1.0" -"@metamask/eth-json-rpc-middleware@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@metamask/eth-json-rpc-middleware/-/eth-json-rpc-middleware-15.0.0.tgz#167288ad4618438af9d1bda75d238cb0facfde3f" - integrity sha512-RkmaPQPWGH1qggaq0sStwVIeamiJOjf/2jBJfbX78r/nDCai8ddY/zHpATJr42SvtRYD0JrCPjo6v356IDzjQw== - dependencies: - "@metamask/eth-block-tracker" "^11.0.3" - "@metamask/eth-json-rpc-provider" "^4.1.5" - "@metamask/eth-sig-util" "^7.0.3" - "@metamask/json-rpc-engine" "^10.0.0" - "@metamask/rpc-errors" "^7.0.0" - "@metamask/utils" "^9.1.0" +"@metamask/eth-json-rpc-middleware@^15.0.0", "@metamask/eth-json-rpc-middleware@^15.0.1": + version "15.1.2" + resolved "https://registry.yarnpkg.com/@metamask/eth-json-rpc-middleware/-/eth-json-rpc-middleware-15.1.2.tgz#1e9e8b91cf7d33665122ced669a3db15757a3e2a" + integrity sha512-36Mk+aL2SlQpd8GGLb5aT1aKl9LqgYzwOf2lyMsTPMTN2pgZvguReQJ/g76XSFh0quUgSrEUzjI862x+sd8ygw== + dependencies: + "@metamask/eth-block-tracker" "^11.0.4" + "@metamask/eth-json-rpc-provider" "^4.1.7" + "@metamask/eth-sig-util" "^8.1.2" + "@metamask/json-rpc-engine" "^10.0.2" + "@metamask/rpc-errors" "^7.0.2" + "@metamask/utils" "^11.0.1" "@types/bn.js" "^5.1.5" bn.js "^5.2.1" klona "^2.0.6" pify "^5.0.0" safe-stable-stringify "^2.4.3" -"@metamask/eth-json-rpc-provider@^4.1.5", "@metamask/eth-json-rpc-provider@^4.1.6": - version "4.1.6" - resolved "https://registry.yarnpkg.com/@metamask/eth-json-rpc-provider/-/eth-json-rpc-provider-4.1.6.tgz#5d86ee7db6ff94b0abe1f00ef02aeffa60536497" - integrity sha512-32gz41C416E0P+b6YpG/2Ne1UoyqxHRGT9xBh1LTFaWvZXfGQxjSTdK+AEVG01pZ8Mf8Bgp8z2SpEsWcE9ZCng== +"@metamask/eth-json-rpc-provider@^4.1.5", "@metamask/eth-json-rpc-provider@^4.1.6", "@metamask/eth-json-rpc-provider@^4.1.7": + version "4.1.7" + resolved "https://registry.yarnpkg.com/@metamask/eth-json-rpc-provider/-/eth-json-rpc-provider-4.1.7.tgz#f15f5b429eafd4fa3b7ab7b9d7317cb6ea8cde25" + integrity sha512-h69LbbnB8ZcOOND2XHd2FVz1ny7XWq+UMJEDPGKtLsjVd4FL57reuA9JxC711audWGffBxfx9Sfdi0l7SfRJrg== dependencies: - "@metamask/json-rpc-engine" "^10.0.1" - "@metamask/rpc-errors" "^7.0.1" + "@metamask/json-rpc-engine" "^10.0.2" + "@metamask/rpc-errors" "^7.0.2" "@metamask/safe-event-emitter" "^3.0.0" - "@metamask/utils" "^10.0.0" + "@metamask/utils" "^11.0.1" uuid "^8.3.2" "@metamask/eth-ledger-bridge-keyring@^8.0.0": @@ -4637,14 +4645,14 @@ ethereum-cryptography "^2.1.2" tweetnacl "^1.0.3" -"@metamask/eth-sig-util@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-8.0.0.tgz#6310d93cd1101cab3cc6bc2a1ff526290ed2695b" - integrity sha512-IwE6aoxUL39IhmsAgE4nk+OZbNo+ThFZRNsUjE1pjdEa4MFpWzm1Rue4zJ5DMy1oUyZBi/aiCLMhdMnjl2bh2Q== +"@metamask/eth-sig-util@^8.0.0", "@metamask/eth-sig-util@^8.1.2": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-8.1.2.tgz#8869bd9cdc989af7402812d5fa4d9a0f6cc30b98" + integrity sha512-+M7TKF8+RwqmfmDCfhgn7jDLtWfbpPCuBfkYPBpk9ptuqINu7+QzthNlU0Rn7jiJ//buyg2pModXVtpRBmgAeA== dependencies: "@ethereumjs/util" "^8.1.0" - "@metamask/abi-utils" "^2.0.4" - "@metamask/utils" "^9.0.0" + "@metamask/abi-utils" "^3.0.0" + "@metamask/utils" "^11.0.1" "@scure/base" "~1.1.3" ethereum-cryptography "^2.1.2" tweetnacl "^1.0.3" @@ -4756,14 +4764,14 @@ bn.js "^5.2.1" uuid "^8.3.2" -"@metamask/json-rpc-engine@^10.0.0", "@metamask/json-rpc-engine@^10.0.1": - version "10.0.1" - resolved "https://registry.yarnpkg.com/@metamask/json-rpc-engine/-/json-rpc-engine-10.0.1.tgz#432e4b42770ecd4da8a89f94b52cdeac982bdca3" - integrity sha512-RmoKubUhK7BtZrllJjqMiSkW0p5QIKiO8ohJoa7/pewJIgPWzPFid/5EahQ4f/sPtTH9O9ypDQF9r7DFCPFSVQ== +"@metamask/json-rpc-engine@^10.0.0", "@metamask/json-rpc-engine@^10.0.1", "@metamask/json-rpc-engine@^10.0.2": + version "10.0.2" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-engine/-/json-rpc-engine-10.0.2.tgz#9173f90ebb16054fe20d5d73a910729a014750ce" + integrity sha512-UZKKvgEGVZyBOTKe0NrERv6J4QtR1X4a3Ppa10FZ2tY+nNvwQg3gFpWPRsYNQdPDFxtIsUdrMrqKvbkYSuHZkw== dependencies: - "@metamask/rpc-errors" "^7.0.1" + "@metamask/rpc-errors" "^7.0.2" "@metamask/safe-event-emitter" "^3.0.0" - "@metamask/utils" "^10.0.0" + "@metamask/utils" "^11.0.1" "@metamask/json-rpc-engine@^8.0.1": version "8.0.2" @@ -4922,7 +4930,7 @@ resolved "https://registry.yarnpkg.com/@metamask/mobile-provider/-/mobile-provider-3.0.0.tgz#8a6a5a0874c8cbe4b468f63dfc57117d207f9595" integrity sha512-XwFJk0rd9lAZR5xS3VC7ypEhD7DvZR2gi2Ch6PHnODIqeS9Te3OdVKK5+jHI4his8v/zs6LWdFdlRtx5/jL96w== -"@metamask/network-controller@^22.1.0", "@metamask/network-controller@^22.1.1": +"@metamask/network-controller@^22.1.1": version "22.1.1" resolved "https://registry.yarnpkg.com/@metamask/network-controller/-/network-controller-22.1.1.tgz#6c3b5aef07ae66ae4cec44a62dbbd7df4421f971" integrity sha512-NTIZjRuPqOynPfPDqy/tPc8ZeKnD2ys8i2ihxq1ODHwSAHBwQ0gogNHBda7PMLaKjuuPkfmh2EzkALiH07MKSg== @@ -4946,6 +4954,30 @@ uri-js "^4.4.1" uuid "^8.3.2" +"@metamask/network-controller@npm:@metamask-previews/network-controller@22.1.1-preview-ffa69e9": + version "22.1.1-preview-ffa69e9" + resolved "https://registry.yarnpkg.com/@metamask-previews/network-controller/-/network-controller-22.1.1-preview-ffa69e9.tgz#d72a8931d787029ccd5c777658466f965f23ae66" + integrity sha512-s0TEJgI8hrWVm3IZ5vRvAGv9udRUCIo08DpkGHU2euzCZJj2Y6t8S9u2kpHVbiG2Wn++qwItl3HvmNO60giBjA== + dependencies: + "@metamask/base-controller" "^7.1.0" + "@metamask/controller-utils" "^11.4.4" + "@metamask/eth-block-tracker" "^11.0.3" + "@metamask/eth-json-rpc-infura" "^10.0.0" + "@metamask/eth-json-rpc-middleware" "^15.0.1" + "@metamask/eth-json-rpc-provider" "^4.1.7" + "@metamask/eth-query" "^4.0.0" + "@metamask/json-rpc-engine" "^10.0.2" + "@metamask/rpc-errors" "^7.0.2" + "@metamask/swappable-obj-proxy" "^2.3.0" + "@metamask/utils" "^11.0.1" + async-mutex "^0.5.0" + fast-deep-equal "^3.1.3" + immer "^9.0.6" + loglevel "^1.8.1" + reselect "^5.1.1" + uri-js "^4.4.1" + uuid "^8.3.2" + "@metamask/nonce-tracker@^6.0.0": version "6.0.0" resolved "https://registry.yarnpkg.com/@metamask/nonce-tracker/-/nonce-tracker-6.0.0.tgz#ada64bdfd469acac5f5f83b914b470025c065ae3" @@ -5175,7 +5207,7 @@ "@metamask/utils" "^10.0.0" cockatiel "^3.1.2" -"@metamask/rpc-errors@7.0.1", "@metamask/rpc-errors@^6.2.1", "@metamask/rpc-errors@^7.0.0", "@metamask/rpc-errors@^7.0.1": +"@metamask/rpc-errors@7.0.1", "@metamask/rpc-errors@^6.2.1", "@metamask/rpc-errors@^7.0.0", "@metamask/rpc-errors@^7.0.1", "@metamask/rpc-errors@^7.0.2": version "7.0.1" resolved "https://registry.yarnpkg.com/@metamask/rpc-errors/-/rpc-errors-7.0.1.tgz#0eb2231a1d5e6bb102df5ac07f365c695bf70055" integrity sha512-EeQGYioq845w2iBmiR9LHYqHhYIaeDTmxprHpPE3BTlkLB74P0xLv/TivOn4snNLowiC5ekOXfcUzCQszTDmSg== @@ -5444,7 +5476,7 @@ lodash "^4.17.21" uuid "^8.3.2" -"@metamask/utils@^10.0.0", "@metamask/utils@^10.0.1", "@metamask/utils@^8.2.0", "@metamask/utils@^8.3.0", "@metamask/utils@^9.0.0", "@metamask/utils@^9.1.0", "@metamask/utils@^9.2.1": +"@metamask/utils@^10.0.0", "@metamask/utils@^10.0.1", "@metamask/utils@^11.0.1", "@metamask/utils@^8.2.0", "@metamask/utils@^8.3.0", "@metamask/utils@^9.0.0", "@metamask/utils@^9.1.0", "@metamask/utils@^9.2.1", "@metamask/utils@^9.3.0": version "10.0.1" resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-10.0.1.tgz#a765f96c20e35fc51c068fb9f88a3332b40b215e" integrity sha512-zHgAitJtRwviVVFnRUA2PLRMaAwatr3jiHgiH7mPicJaeSK4ma01aGR4fHy0iy5tlVo1ZiioTmJ1Hbp8FZ6pSg==