From d35f396c2f1247fc98b2aa035064b2ae292f8b53 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:42:39 -0400 Subject: [PATCH] Handle alternate SimplePool exports --- js/nostr.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/nostr.js b/js/nostr.js index 4ef33572..07926d72 100644 --- a/js/nostr.js +++ b/js/nostr.js @@ -4292,7 +4292,14 @@ class NostrClient { } const tools = await ensureNostrTools(); - const SimplePool = tools?.SimplePool; + const SimplePool = + typeof tools?.SimplePool === "function" + ? tools.SimplePool + : typeof tools?.pool?.SimplePool === "function" + ? tools.pool.SimplePool + : typeof tools?.SimplePool?.SimplePool === "function" + ? tools.SimplePool.SimplePool + : null; if (typeof SimplePool !== "function") { const error = new Error("NostrTools SimplePool is unavailable."); error.code = "nostr-simplepool-unavailable";