Skip to content

Commit af622c6

Browse files
committed
add jsdocs
1 parent 3424c04 commit af622c6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

packages/network-controller/src/NetworkController.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,8 @@ export class NetworkController extends BaseController<
650650

651651
/**
652652
* Accesses the provider and block tracker for the currently selected network.
653-
*
654653
* @returns The proxy and block tracker proxies.
654+
* @deprecated This method has been replaced by `getSelectedNetworkClient` (which has a more easily used return type) and will be removed in a future release.
655655
*/
656656
getProviderAndBlockTracker(): {
657657
provider: SwappableProxy<ProxyWithAccessibleTarget<Provider>> | undefined;
@@ -665,6 +665,11 @@ export class NetworkController extends BaseController<
665665
};
666666
}
667667

668+
/**
669+
* Accesses the provider and block tracker for the currently selected network.
670+
*
671+
* @returns an object with the provider and block tracker proxies for the currently selected network.
672+
*/
668673
getSelectedNetworkClient():
669674
| {
670675
provider: SwappableProxy<ProxyWithAccessibleTarget<Provider>>;

packages/selected-network-controller/src/SelectedNetworkController.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@ export class SelectedNetworkController extends BaseController<
231231
});
232232
}
233233

234+
/**
235+
* This method is used when a domain is removed from the PermissionsController.
236+
* It will remove repoint the network proxy to the globally selected network in the domainProxyMap or, if no globally selected network client is available, delete the proxy.
237+
*
238+
* @param domain - The domain for which to unset the network client ID.
239+
*/
234240
#unsetNetworkClientIdForDomain(domain: Domain) {
235241
const globallySelectedNetworkClient = this.messagingSystem.call(
236242
'NetworkController:getSelectedNetworkClient',

0 commit comments

Comments
 (0)