@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.
- package/dist/NetworkController.js +2 -2
- package/dist/NetworkController.mjs +1 -1
- package/dist/{chunk-DARVWUIF.mjs → chunk-7TBVWXBH.mjs} +4 -12
- package/dist/{chunk-NGN5FE4G.js.map → chunk-7TBVWXBH.mjs.map} +1 -1
- package/dist/{chunk-NGN5FE4G.js → chunk-DK2VJFWG.js} +3 -11
- package/dist/chunk-DK2VJFWG.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/NetworkController.d.ts +1 -1
- package/dist/types/NetworkController.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/chunk-DARVWUIF.mjs.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
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 =
|
|
18
|
+
exports.NetworkController = _chunkDK2VJFWGjs.NetworkController; exports.RpcEndpointType = _chunkDK2VJFWGjs.RpcEndpointType; exports.getDefaultNetworkControllerState = _chunkDK2VJFWGjs.getDefaultNetworkControllerState; exports.knownKeysOf = _chunkDK2VJFWGjs.knownKeysOf;
|
|
19
19
|
//# sourceMappingURL=NetworkController.js.map
|
|
@@ -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
|
|
1374
|
-
|
|
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-
|
|
1473
|
+
//# sourceMappingURL=chunk-7TBVWXBH.mjs.map
|