@metamask-previews/network-controller 23.1.0-preview-8365901 → 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 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
@@ -129,10 +129,6 @@ function getDefaultNetworkConfigurationsByChainId(additionalDefaultNetworks = []
129
129
  function getDefaultInfuraNetworkConfigurationsByChainId() {
130
130
  return Object.values(controller_utils_1.InfuraNetworkType).reduce((obj, infuraNetworkType) => {
131
131
  const chainId = controller_utils_1.ChainId[infuraNetworkType];
132
- // Skip deprecated network as default network.
133
- if (constants_1.DEPRECATED_NETWORKS.has(chainId)) {
134
- return obj;
135
- }
136
132
  const rpcEndpointUrl =
137
133
  // This ESLint rule mistakenly produces an error.
138
134
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
@@ -420,8 +416,10 @@ class NetworkController extends base_controller_1.BaseController {
420
416
  // ESLint is mistaken here; `name` is a string.
421
417
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
422
418
  `${this.name}:getNetworkConfigurationByNetworkClientId`, this.getNetworkConfigurationByNetworkClientId.bind(this));
423
- this.messagingSystem.registerActionHandler(`${this.name}:getSelectedNetworkClient`, this.getSelectedNetworkClient.bind(this));
424
- this.messagingSystem.registerActionHandler(`${this.name}:getSelectedChainId`, this.getSelectedChainId.bind(this));
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));
425
423
  this.messagingSystem.registerActionHandler(
426
424
  // ESLint is mistaken here; `name` is a string.
427
425
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
@@ -460,15 +458,6 @@ class NetworkController extends base_controller_1.BaseController {
460
458
  }
461
459
  return undefined;
462
460
  }
463
- /**
464
- * Accesses the chain ID from the selected network client.
465
- *
466
- * @returns The chain ID of the selected network client in hex format or undefined if there is no network client.
467
- */
468
- getSelectedChainId() {
469
- const networkConfiguration = this.getNetworkConfigurationByNetworkClientId(this.state.selectedNetworkClientId);
470
- return networkConfiguration?.chainId;
471
- }
472
461
  /**
473
462
  * Internally, the Infura and custom network clients are categorized by type
474
463
  * so that when accessing either kind of network client, TypeScript knows