Skip to content

Commit

Permalink
fix: don't use limit 1 for useLatestEvent hook
Browse files Browse the repository at this point in the history
  • Loading branch information
verbiricha committed Jan 2, 2024
1 parent c609a47 commit 23a8f94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/hooks/useLatestEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

2 comments on commit 23a8f94

@vercel
Copy link

@vercel vercel bot commented on 23a8f94 Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 23a8f94 Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.