-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00ee4cf
commit 536ab0a
Showing
4 changed files
with
15 additions
and
40 deletions.
There are no files selected for viewing
43 changes: 6 additions & 37 deletions
43
.yarn/patches/@metamask-network-controller-npm-18.0.1-c4d0cfaecd.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,24 @@ | ||
diff --git a/dist/chunk-VNCJZRDU.js b/dist/chunk-VNCJZRDU.js | ||
index 78251fc9517438d90261ed53172d2a4133d3a5fd..d9fa7bc4b4fdc7d2cc9687cf9ad34c2e65cf809e 100644 | ||
index 78251fc9517438d90261ed53172d2a4133d3a5fd..3ecc0c2838ac12c0ff5b5521a82b08955287956b 100644 | ||
--- a/dist/chunk-VNCJZRDU.js | ||
+++ b/dist/chunk-VNCJZRDU.js | ||
@@ -320,10 +320,14 @@ var NetworkController = class extends _basecontroller.BaseController { | ||
* Populates the network clients and establishes the initial network based on | ||
* the provider configuration in state. | ||
*/ | ||
- async initializeProvider() { | ||
+ async initializeProvider(lookup) { | ||
@@ -323,7 +323,6 @@ var NetworkController = class extends _basecontroller.BaseController { | ||
async initializeProvider() { | ||
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _ensureAutoManagedNetworkClientRegistryPopulated, ensureAutoManagedNetworkClientRegistryPopulated_fn).call(this); | ||
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _applyNetworkSelection, applyNetworkSelection_fn).call(this); | ||
- await this.lookupNetwork(); | ||
+ | ||
+ lookup = lookup !== undefined ? lookup : true; | ||
+ if (lookup) { | ||
+ await this.lookupNetwork(); | ||
+ } | ||
} | ||
/** | ||
* Refreshes the network meta with EIP-1559 support and the network status | ||
diff --git a/dist/chunk-XWP6GXMK.mjs b/dist/chunk-XWP6GXMK.mjs | ||
index fb7e30d27367a38e8a357ff9e744894a4505b5a5..670117818e9634c360eeef632e7b614bbc6df9ea 100644 | ||
index fb7e30d27367a38e8a357ff9e744894a4505b5a5..884bb1d124934a613847d7fd398fbc6cb02cade8 100644 | ||
--- a/dist/chunk-XWP6GXMK.mjs | ||
+++ b/dist/chunk-XWP6GXMK.mjs | ||
@@ -320,10 +320,14 @@ var NetworkController = class extends BaseController { | ||
* Populates the network clients and establishes the initial network based on | ||
* the provider configuration in state. | ||
*/ | ||
- async initializeProvider() { | ||
+ async initializeProvider(lookup) { | ||
@@ -323,7 +323,6 @@ var NetworkController = class extends BaseController { | ||
async initializeProvider() { | ||
__privateMethod(this, _ensureAutoManagedNetworkClientRegistryPopulated, ensureAutoManagedNetworkClientRegistryPopulated_fn).call(this); | ||
__privateMethod(this, _applyNetworkSelection, applyNetworkSelection_fn).call(this); | ||
- await this.lookupNetwork(); | ||
+ | ||
+ lookup = lookup !== undefined ? lookup : true; | ||
+ if (lookup) { | ||
+ await this.lookupNetwork(); | ||
+ } | ||
} | ||
/** | ||
* Refreshes the network meta with EIP-1559 support and the network status | ||
diff --git a/dist/types/NetworkController.d.ts b/dist/types/NetworkController.d.ts | ||
index f1e1e49de2461d7606374d6a1a406abd54581bf7..a06f3c627bf1e31a2ca3ef351a74c3615474fea2 100644 | ||
--- a/dist/types/NetworkController.d.ts | ||
+++ b/dist/types/NetworkController.d.ts | ||
@@ -272,7 +272,7 @@ export declare class NetworkController extends BaseController<typeof name, Netwo | ||
* Populates the network clients and establishes the initial network based on | ||
* the provider configuration in state. | ||
*/ | ||
- initializeProvider(): Promise<void>; | ||
+ initializeProvider(lookup: Boolean): Promise<void>; | ||
/** | ||
* Refreshes the network meta with EIP-1559 support and the network status | ||
* based on the given network client ID. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@metamask-network-controller-npm-18.0.1-c4d0cfaecd.patch | ||
|
||
We remove lookupNetwork from initializeProvider in the network controller to prevent network requests before user onboarding is completed. | ||
The network lookup is done after onboarding is completed, and when the extension reloads if onboarding has been completed. | ||
This patch is part of a temporary fix that will be reverted soon to make way for a more permanent solution. https://github.com/MetaMask/metamask-extension/pull/23005 | ||
You can see the changes before compilation on this branch: https://github.com/MetaMask/core/compare/pnf/ext-23622-review?expand=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters