From 1cc1a0d2b1ed9ed9758efff88329ed9da7e679db Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 25 Mar 2023 10:51:29 -0400 Subject: [PATCH] *Use maybeGetAsyncProperty to get remotePublicKey --- src/network.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/network.ts b/src/network.ts index dab9747..ea53267 100644 --- a/src/network.ts +++ b/src/network.ts @@ -119,7 +119,9 @@ export default class RpcNetwork { this.setupRelayPromise(); this._swarm.on("connection", async (relay: any) => { - const pubkey = b4a.from(relay.remotePublicKey).toString("hex"); + const pubkey = b4a + .from(await maybeGetAsyncProperty(relay.remotePublicKey)) + .toString("hex"); relay.once("close", () => { this._methods.forEach((item) => { if (item.has(pubkey)) {