feat: add subscribeToUpdates method
This commit is contained in:
parent
3564a0f7b9
commit
dc51de20a7
|
@ -22,6 +22,11 @@ export class NetworkRegistryClient extends Client {
|
||||||
public async getNetworksByType(type: string) {
|
public async getNetworksByType(type: string) {
|
||||||
return this.callModuleReturn("getNetworksByType", { type });
|
return this.callModuleReturn("getNetworksByType", { type });
|
||||||
}
|
}
|
||||||
|
public subscribeToUpdates(cb: () => void) {
|
||||||
|
const [stop] = this.connectModule("subscribeToUpdates", undefined, cb);
|
||||||
|
|
||||||
|
return stop;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createClient = factory<NetworkRegistryClient>(
|
export const createClient = factory<NetworkRegistryClient>(
|
||||||
|
|
Loading…
Reference in New Issue