@metamask-previews/network-controller 23.1.0-preview-cff14565 → 23.1.0-preview-eb4d653e
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 +7 -0
- package/dist/NetworkController.cjs +4 -11
- package/dist/NetworkController.cjs.map +1 -1
- package/dist/NetworkController.d.cts +3 -13
- package/dist/NetworkController.d.cts.map +1 -1
- package/dist/NetworkController.d.mts +3 -13
- package/dist/NetworkController.d.mts.map +1 -1
- package/dist/NetworkController.mjs +4 -11
- package/dist/NetworkController.mjs.map +1 -1
- package/dist/create-network-client.cjs +1 -1
- package/dist/create-network-client.cjs.map +1 -1
- package/dist/create-network-client.mjs +1 -1
- package/dist/create-network-client.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Update `RpcEndpoint` so that `failoverUrls` is optional ([#5561](https://github.com/MetaMask/core/pull/5561))
|
|
13
|
+
- This property was introduced in 23.0.0 as a breaking change, but this change makes it non-breaking
|
|
14
|
+
- Update `NetworkClientConfiguration` so that `failoverUrls` is optional ([#5561](https://github.com/MetaMask/core/pull/5561))
|
|
15
|
+
- This property was introduced in 23.0.0 as a breaking change, but this change makes it non-breaking
|
|
16
|
+
|
|
10
17
|
## [23.1.0]
|
|
11
18
|
|
|
12
19
|
### Added
|
|
@@ -416,8 +416,10 @@ class NetworkController extends base_controller_1.BaseController {
|
|
|
416
416
|
// ESLint is mistaken here; `name` is a string.
|
|
417
417
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
418
418
|
`${this.name}:getNetworkConfigurationByNetworkClientId`, this.getNetworkConfigurationByNetworkClientId.bind(this));
|
|
419
|
-
this.messagingSystem.registerActionHandler(
|
|
420
|
-
|
|
419
|
+
this.messagingSystem.registerActionHandler(
|
|
420
|
+
// TODO: Either fix this lint violation or explain why it's necessary to ignore.
|
|
421
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
422
|
+
`${this.name}:getSelectedNetworkClient`, this.getSelectedNetworkClient.bind(this));
|
|
421
423
|
this.messagingSystem.registerActionHandler(
|
|
422
424
|
// ESLint is mistaken here; `name` is a string.
|
|
423
425
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
@@ -456,15 +458,6 @@ class NetworkController extends base_controller_1.BaseController {
|
|
|
456
458
|
}
|
|
457
459
|
return undefined;
|
|
458
460
|
}
|
|
459
|
-
/**
|
|
460
|
-
* Accesses the chain ID from the selected network client.
|
|
461
|
-
*
|
|
462
|
-
* @returns The chain ID of the selected network client in hex format or undefined if there is no network client.
|
|
463
|
-
*/
|
|
464
|
-
getSelectedChainId() {
|
|
465
|
-
const networkConfiguration = this.getNetworkConfigurationByNetworkClientId(this.state.selectedNetworkClientId);
|
|
466
|
-
return networkConfiguration?.chainId;
|
|
467
|
-
}
|
|
468
461
|
/**
|
|
469
462
|
* Internally, the Infura and custom network clients are categorized by type
|
|
470
463
|
* so that when accessing either kind of network client, TypeScript knows
|