@metamask-previews/network-controller 24.1.0-preview-0684712d → 24.1.0-preview-8029191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/NetworkController.cjs +5 -7
- package/dist/NetworkController.cjs.map +1 -1
- package/dist/NetworkController.d.cts +42 -5
- package/dist/NetworkController.d.cts.map +1 -1
- package/dist/NetworkController.d.mts +42 -5
- package/dist/NetworkController.d.mts.map +1 -1
- package/dist/NetworkController.mjs +5 -7
- package/dist/NetworkController.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,12 +10,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
12
|
- Add two new controller state metadata properties: `includeInStateLogs` and `usedInUi` ([#6525](https://github.com/MetaMask/core/pull/6525))
|
|
13
|
+
- Add `lookupNetwork` option to `initializeProvider`, to allow for skipping the request used to populate metadata for the globally selected network ([#6575](https://github.com/MetaMask/core/pull/6575), [#6607](https://github.com/MetaMask/core/pull/6607))
|
|
14
|
+
- If `lookupNetwork` is set to `false`, the function is fully synchronous, and does not return a promise.
|
|
13
15
|
|
|
14
16
|
### Changed
|
|
15
17
|
|
|
16
18
|
- Bump `@metamask/base-controller` from `^8.1.0` to `^8.3.0` ([#6355](https://github.com/MetaMask/core/pull/6355), [#6465](https://github.com/MetaMask/core/pull/6465))
|
|
17
19
|
- Rephrase "circuit broken" errors so they are more user-friendly ([#6423](https://github.com/MetaMask/core/pull/6423))
|
|
18
20
|
- These are errors produced when a request is made to an RPC endpoint after it returns too many consecutive 5xx responses and the underlying circuit is open.
|
|
21
|
+
- Bump `@metamask/utils` from `^11.4.2` to `^11.8.0` ([#6588](https://github.com/MetaMask/core/pull/6588))
|
|
19
22
|
|
|
20
23
|
### Deprecated
|
|
21
24
|
|
|
@@ -565,14 +565,12 @@ class NetworkController extends base_controller_1.BaseController {
|
|
|
565
565
|
}
|
|
566
566
|
return customNetworkClient;
|
|
567
567
|
}
|
|
568
|
-
|
|
569
|
-
* Ensures that network clients for Infura and custom RPC endpoints have been
|
|
570
|
-
* created. Then, consulting state, initializes and establishes the currently
|
|
571
|
-
* selected network client.
|
|
572
|
-
*/
|
|
573
|
-
async initializeProvider() {
|
|
568
|
+
initializeProvider({ lookupNetwork = true, } = {}) {
|
|
574
569
|
__classPrivateFieldGet(this, _NetworkController_instances, "m", _NetworkController_applyNetworkSelection).call(this, this.state.selectedNetworkClientId);
|
|
575
|
-
|
|
570
|
+
if (lookupNetwork) {
|
|
571
|
+
return this.lookupNetwork();
|
|
572
|
+
}
|
|
573
|
+
return undefined;
|
|
576
574
|
}
|
|
577
575
|
/**
|
|
578
576
|
* Uses a request for the latest block to gather the following information on
|