From 23a8f94b99a7f75c6bfb6025589832ddc54eb2a3 Mon Sep 17 00:00:00 2001 From: verbiricha Date: Tue, 2 Jan 2024 14:31:55 +0100 Subject: [PATCH] fix: don't use limit 1 for useLatestEvent hook --- packages/core/src/hooks/useLatestEvent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/hooks/useLatestEvent.tsx b/packages/core/src/hooks/useLatestEvent.tsx index 4d6b28b..008fc30 100644 --- a/packages/core/src/hooks/useLatestEvent.tsx +++ b/packages/core/src/hooks/useLatestEvent.tsx @@ -24,7 +24,7 @@ export default function useLatestEvent( relays?.length ?? 0 > 0 ? NDKRelaySet.fromRelayUrls(relays as string[], ndk) : undefined; - const sub = ndk.subscribe({ ...filter, limit: 1 }, opts, relaySet); + const sub = ndk.subscribe(filter, opts, relaySet); sub.on("event", (ev: NDKEvent) => { const lastSeen = event?.created_at ?? 0; const createdAt = ev?.created_at ?? 0;