refactor: have registerNetwork just call the module directly and have the network modules call it

This commit is contained in:
Derrick Hammer 2023-07-19 12:10:49 -04:00
parent 8d98d36770
commit bd3cfa3e7a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 5 deletions

View File

@ -15,11 +15,8 @@ export class NetworkRegistryClient extends Client {
return this.callModuleReturn("getNetworkTypes", { module }); return this.callModuleReturn("getNetworkTypes", { module });
} }
public async registerNetwork(module: string) { public async registerNetwork(types: string[]) {
const bag = this.getBound(module); return this.callModuleReturn("registerNetwork", { types });
const ret = await bag.callModule("register");
this.handleError(ret);
} }
} }