refactor: have registerNetwork just call the module directly and have the network modules call it
This commit is contained in:
parent
8d98d36770
commit
bd3cfa3e7a
|
@ -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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue