@metamask-previews/network-controller 20.0.0-preview-ee06f305 → 20.0.0-preview-276db038

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.
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkNGN5FE4Gjs = require('./chunk-NGN5FE4G.js');
6
+ var _chunkDK2VJFWGjs = require('./chunk-DK2VJFWG.js');
7
7
  require('./chunk-ZKNI7MD3.js');
8
8
  require('./chunk-LLMZDA4Q.js');
9
9
  require('./chunk-E4V6XEBR.js');
@@ -15,5 +15,5 @@ require('./chunk-Z4BLTVTB.js');
15
15
 
16
16
 
17
17
 
18
- exports.NetworkController = _chunkNGN5FE4Gjs.NetworkController; exports.RpcEndpointType = _chunkNGN5FE4Gjs.RpcEndpointType; exports.getDefaultNetworkControllerState = _chunkNGN5FE4Gjs.getDefaultNetworkControllerState; exports.knownKeysOf = _chunkNGN5FE4Gjs.knownKeysOf;
18
+ exports.NetworkController = _chunkDK2VJFWGjs.NetworkController; exports.RpcEndpointType = _chunkDK2VJFWGjs.RpcEndpointType; exports.getDefaultNetworkControllerState = _chunkDK2VJFWGjs.getDefaultNetworkControllerState; exports.knownKeysOf = _chunkDK2VJFWGjs.knownKeysOf;
19
19
  //# sourceMappingURL=NetworkController.js.map
@@ -3,7 +3,7 @@ import {
3
3
  RpcEndpointType,
4
4
  getDefaultNetworkControllerState,
5
5
  knownKeysOf
6
- } from "./chunk-DARVWUIF.mjs";
6
+ } from "./chunk-7TBVWXBH.mjs";
7
7
  import "./chunk-2QJYHWIP.mjs";
8
8
  import "./chunk-TZA3CBEI.mjs";
9
9
  import "./chunk-U43RY4MY.mjs";
@@ -18,7 +18,6 @@ import {
18
18
  // src/NetworkController.ts
19
19
  import { BaseController } from "@metamask/base-controller";
20
20
  import {
21
- toHex,
22
21
  InfuraNetworkType,
23
22
  NetworkType,
24
23
  isSafeChainId,
@@ -30,12 +29,7 @@ import {
30
29
  import EthQuery from "@metamask/eth-query";
31
30
  import { errorCodes } from "@metamask/rpc-errors";
32
31
  import { createEventEmitterProxy } from "@metamask/swappable-obj-proxy";
33
- import {
34
- hexToBigInt,
35
- isStrictHexString,
36
- hasProperty,
37
- isPlainObject
38
- } from "@metamask/utils";
32
+ import { isStrictHexString, hasProperty, isPlainObject } from "@metamask/utils";
39
33
  import { strict as assert } from "assert";
40
34
  import * as URI from "uri-js";
41
35
  import { inspect } from "util";
@@ -1370,10 +1364,8 @@ ensureAutoManagedNetworkClientRegistryPopulated_fn = function() {
1370
1364
  };
1371
1365
  _createAutoManagedNetworkClientRegistry = new WeakSet();
1372
1366
  createAutoManagedNetworkClientRegistry_fn = function() {
1373
- const sortedChainIds = Object.keys(
1374
- this.state.networkConfigurationsByChainId
1375
- ).map(hexToBigInt).sort().map(toHex);
1376
- const networkClientsWithIds = sortedChainIds.flatMap((chainId) => {
1367
+ const chainIds = knownKeysOf(this.state.networkConfigurationsByChainId);
1368
+ const networkClientsWithIds = chainIds.flatMap((chainId) => {
1377
1369
  const networkConfiguration = this.state.networkConfigurationsByChainId[chainId];
1378
1370
  return networkConfiguration.rpcEndpoints.map((rpcEndpoint) => {
1379
1371
  if (rpcEndpoint.type === "infura" /* Infura */) {
@@ -1478,4 +1470,4 @@ export {
1478
1470
  getDefaultNetworkControllerState,
1479
1471
  NetworkController
1480
1472
  };
1481
- //# sourceMappingURL=chunk-DARVWUIF.mjs.map
1473
+ //# sourceMappingURL=chunk-7TBVWXBH.mjs.map