Skip to content

Commit d9dd7f4

Browse files
committed
fix: unit tests
1 parent 2b77c88 commit d9dd7f4

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

packages/network-controller/src/NetworkController.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,72 @@ export type NetworkControllerGetEthQueryAction = {
519519
handler: () => EthQuery | undefined;
520520
};
521521

522+
export type NetworkControllerGetNetworkClientByIdAction = {
523+
type: `NetworkController:getNetworkClientById`;
524+
handler: NetworkController['getNetworkClientById'];
525+
};
526+
527+
export type NetworkControllerGetSelectedNetworkClientAction = {
528+
type: `NetworkController:getSelectedNetworkClient`;
529+
handler: NetworkController['getSelectedNetworkClient'];
530+
};
531+
532+
export type NetworkControllerGetSelectedChainIdAction = {
533+
type: 'NetworkController:getSelectedChainId';
534+
handler: NetworkController['getSelectedChainId'];
535+
};
536+
537+
export type NetworkControllerGetEIP1559CompatibilityAction = {
538+
type: `NetworkController:getEIP1559Compatibility`;
539+
handler: NetworkController['getEIP1559Compatibility'];
540+
};
541+
542+
export type NetworkControllerFindNetworkClientIdByChainIdAction = {
543+
type: `NetworkController:findNetworkClientIdByChainId`;
544+
handler: NetworkController['findNetworkClientIdByChainId'];
545+
};
546+
547+
/**
548+
* Change the currently selected network to the given built-in network type.
549+
*
550+
* @deprecated This action has been replaced by `setActiveNetwork`, and will be
551+
* removed in a future release.
552+
*/
553+
export type NetworkControllerSetProviderTypeAction = {
554+
type: `NetworkController:setProviderType`;
555+
handler: NetworkController['setProviderType'];
556+
};
557+
558+
export type NetworkControllerSetActiveNetworkAction = {
559+
type: `NetworkController:setActiveNetwork`;
560+
handler: NetworkController['setActiveNetwork'];
561+
};
562+
563+
export type NetworkControllerGetNetworkConfigurationByChainId = {
564+
type: `NetworkController:getNetworkConfigurationByChainId`;
565+
handler: NetworkController['getNetworkConfigurationByChainId'];
566+
};
567+
568+
export type NetworkControllerGetNetworkConfigurationByNetworkClientId = {
569+
type: `NetworkController:getNetworkConfigurationByNetworkClientId`;
570+
handler: NetworkController['getNetworkConfigurationByNetworkClientId'];
571+
};
572+
573+
export type NetworkControllerAddNetworkAction = {
574+
type: 'NetworkController:addNetwork';
575+
handler: NetworkController['addNetwork'];
576+
};
577+
578+
export type NetworkControllerRemoveNetworkAction = {
579+
type: 'NetworkController:removeNetwork';
580+
handler: NetworkController['removeNetwork'];
581+
};
582+
583+
export type NetworkControllerUpdateNetworkAction = {
584+
type: 'NetworkController:updateNetwork';
585+
handler: NetworkController['updateNetwork'];
586+
};
587+
522588
// Define the methods we want to expose via the messenger
523589
const MESSENGER_EXPOSED_METHODS = [
524590
'getNetworkClientById',

packages/network-controller/src/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ export type {
2222
NetworkControllerEvents,
2323
NetworkControllerGetStateAction,
2424
NetworkControllerGetEthQueryAction,
25+
NetworkControllerGetNetworkClientByIdAction,
26+
NetworkControllerGetSelectedNetworkClientAction,
27+
NetworkControllerGetSelectedChainIdAction,
28+
NetworkControllerGetEIP1559CompatibilityAction,
29+
NetworkControllerFindNetworkClientIdByChainIdAction,
30+
NetworkControllerSetProviderTypeAction,
31+
NetworkControllerSetActiveNetworkAction,
32+
NetworkControllerAddNetworkAction,
33+
NetworkControllerRemoveNetworkAction,
34+
NetworkControllerUpdateNetworkAction,
35+
NetworkControllerGetNetworkConfigurationByNetworkClientId,
2536
NetworkControllerActions,
2637
NetworkControllerMessenger,
2738
NetworkControllerOptions,

0 commit comments

Comments
 (0)