From 4eb5f246960b8a328d242a1552e74ceea9f3352c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 19 Mar 2023 15:22:41 -0400 Subject: [PATCH] *Call swarm init and ready before calling readyWithRelays on ready method --- src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.ts b/src/index.ts index ae57fde..a88567d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -82,6 +82,12 @@ async function handleSimpleQuery(aq: ActiveQuery) { } async function handleReady(aq: ActiveQuery) { + const network = await getNetwork(aq); + const swarm: SwarmClient = network.swarm; + + await swarm.init(); + await swarm.ready(); + await ( await getNetwork(aq) ).readyWithRelays;