From bd3cfa3e7acd66b10658c872f8906594fb18640d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 19 Jul 2023 12:10:49 -0400 Subject: [PATCH] refactor: have registerNetwork just call the module directly and have the network modules call it --- src/index.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index ba01b3b..65a0e1b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,11 +15,8 @@ export class NetworkRegistryClient extends Client { return this.callModuleReturn("getNetworkTypes", { module }); } - public async registerNetwork(module: string) { - const bag = this.getBound(module); - - const ret = await bag.callModule("register"); - this.handleError(ret); + public async registerNetwork(types: string[]) { + return this.callModuleReturn("registerNetwork", { types }); } }