From 623f80041842d44365a3fab2b03e3e631743ac43 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 19 Mar 2023 15:20:53 -0400 Subject: [PATCH] *Use createClient factory --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 35c6a5c..fb7af35 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ import { addHandler, handleMessage } from "libkmodule"; import type { ActiveQuery } from "libkmodule"; -import { SwarmClient } from "@lumeweb/kernel-swarm-client"; +import { createClient, SwarmClient } from "@lumeweb/kernel-swarm-client"; import { RpcNetwork, RpcQueryOptions } from "@lumeweb/rpc-client"; import type { RPCRequest, RPCResponse } from "@lumeweb/interface-relay"; @@ -88,7 +88,7 @@ async function handleReady(aq: ActiveQuery) { aq.respond(); } async function createNetwork(def = true): Promise { - const dhtInstance = new RpcNetwork(new SwarmClient(def)); + const dhtInstance = new RpcNetwork(createClient(def)); const id = nextId(); networkInstances.set(id, dhtInstance);