@metamask-previews/network-controller 22.0.2-preview-5544fdb2 → 22.0.2-preview-8a04affb
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.cjs +0 -16
- package/dist/NetworkController.cjs.map +1 -1
- package/dist/NetworkController.d.cts +3 -31
- package/dist/NetworkController.d.cts.map +1 -1
- package/dist/NetworkController.d.mts +3 -31
- package/dist/NetworkController.d.mts.map +1 -1
- package/dist/NetworkController.mjs +0 -16
- package/dist/NetworkController.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/package.json +1 -1
|
@@ -336,18 +336,6 @@ class NetworkController extends base_controller_1.BaseController {
|
|
|
336
336
|
// TODO: Either fix this lint violation or explain why it's necessary to ignore.
|
|
337
337
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
338
338
|
`${this.name}:getSelectedNetworkClient`, this.getSelectedNetworkClient.bind(this));
|
|
339
|
-
this.messagingSystem.registerActionHandler(
|
|
340
|
-
// ESLint is mistaken here; `name` is a string.
|
|
341
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
342
|
-
`${this.name}:addNetwork`, this.addNetwork.bind(this));
|
|
343
|
-
this.messagingSystem.registerActionHandler(
|
|
344
|
-
// ESLint is mistaken here; `name` is a string.
|
|
345
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
346
|
-
`${this.name}:removeNetwork`, this.removeNetwork.bind(this));
|
|
347
|
-
this.messagingSystem.registerActionHandler(
|
|
348
|
-
// ESLint is mistaken here; `name` is a string.
|
|
349
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
350
|
-
`${this.name}:updateNetwork`, this.updateNetwork.bind(this));
|
|
351
339
|
}
|
|
352
340
|
/**
|
|
353
341
|
* Accesses the provider and block tracker for the currently selected network.
|
|
@@ -999,7 +987,6 @@ class NetworkController extends base_controller_1.BaseController {
|
|
|
999
987
|
});
|
|
1000
988
|
});
|
|
1001
989
|
__classPrivateFieldSet(this, _NetworkController_networkConfigurationsByNetworkClientId, buildNetworkConfigurationsByNetworkClientId(this.state.networkConfigurationsByChainId), "f");
|
|
1002
|
-
this.messagingSystem.publish('NetworkController:networkRemoved', existingNetworkConfiguration);
|
|
1003
990
|
}
|
|
1004
991
|
/**
|
|
1005
992
|
* Assuming that the network has been previously switched, switches to this
|
|
@@ -1293,9 +1280,6 @@ async function _NetworkController_determineEIP1559Compatibility(networkClientId)
|
|
|
1293
1280
|
delete state.networkConfigurationsByChainId[args.existingNetworkConfiguration.chainId];
|
|
1294
1281
|
}
|
|
1295
1282
|
if (mode === 'add' || mode === 'update') {
|
|
1296
|
-
if (JSON.stringify(state.networkConfigurationsByChainId[args.networkFields.chainId]) !== JSON.stringify(args.networkConfigurationToPersist)) {
|
|
1297
|
-
args.networkConfigurationToPersist.lastUpdatedAt = Date.now();
|
|
1298
|
-
}
|
|
1299
1283
|
state.networkConfigurationsByChainId[args.networkFields.chainId] =
|
|
1300
1284
|
args.networkConfigurationToPersist;
|
|
1301
1285
|
}
|