From 157ecac58b1adf3f527be370b1b324c8ef4f2577 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 21 Feb 2026 13:57:43 -0600 Subject: [PATCH] Remove AbortSignal.any calls --- .claude/skills/nostr-infinite-scroll/SKILL.md | 4 ++-- src/hooks/useAuthor.ts | 4 ++-- src/hooks/useComments.ts | 4 ++-- src/hooks/useLoggedInAccounts.ts | 4 ++-- src/hooks/useZaps.ts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.claude/skills/nostr-infinite-scroll/SKILL.md b/.claude/skills/nostr-infinite-scroll/SKILL.md index c916457..6041b55 100644 --- a/.claude/skills/nostr-infinite-scroll/SKILL.md +++ b/.claude/skills/nostr-infinite-scroll/SKILL.md @@ -16,12 +16,12 @@ export function useGlobalFeed() { return useInfiniteQuery({ queryKey: ['global-feed'], - queryFn: async ({ pageParam, signal }) => { + queryFn: async ({ pageParam }) => { const filter = { kinds: [1], limit: 20 }; if (pageParam) filter.until = pageParam; const events = await nostr.query([filter], { - signal: AbortSignal.any([signal, AbortSignal.timeout(1500)]) + signal: AbortSignal.timeout(1500), }); return events; diff --git a/src/hooks/useAuthor.ts b/src/hooks/useAuthor.ts index 51b7e80..952cad3 100644 --- a/src/hooks/useAuthor.ts +++ b/src/hooks/useAuthor.ts @@ -7,14 +7,14 @@ export function useAuthor(pubkey: string | undefined) { return useQuery<{ event?: NostrEvent; metadata?: NostrMetadata }>({ queryKey: ['nostr', 'author', pubkey ?? ''], - queryFn: async ({ signal }) => { + queryFn: async () => { if (!pubkey) { return {}; } const [event] = await nostr.query( [{ kinds: [0], authors: [pubkey!], limit: 1 }], - { signal: AbortSignal.any([signal, AbortSignal.timeout(1500)]) }, + { signal: AbortSignal.timeout(1500) }, ); if (!event) { diff --git a/src/hooks/useComments.ts b/src/hooks/useComments.ts index 5fdf42b..3a16c4c 100644 --- a/src/hooks/useComments.ts +++ b/src/hooks/useComments.ts @@ -7,7 +7,7 @@ export function useComments(root: NostrEvent | URL, limit?: number) { return useQuery({ queryKey: ['nostr', 'comments', root instanceof URL ? root.toString() : root.id, limit], - queryFn: async (c) => { + queryFn: async () => { const filter: NostrFilter = { kinds: [1111] }; if (root instanceof URL) { @@ -26,7 +26,7 @@ export function useComments(root: NostrEvent | URL, limit?: number) { } // Query for all kind 1111 comments that reference this addressable event regardless of depth - const signal = AbortSignal.any([c.signal, AbortSignal.timeout(5000)]); + const signal = AbortSignal.timeout(5000); const events = await nostr.query([filter], { signal }); // Helper function to get tag value diff --git a/src/hooks/useLoggedInAccounts.ts b/src/hooks/useLoggedInAccounts.ts index e1b1d8c..9b639d9 100644 --- a/src/hooks/useLoggedInAccounts.ts +++ b/src/hooks/useLoggedInAccounts.ts @@ -16,10 +16,10 @@ export function useLoggedInAccounts() { const { data: authors = [] } = useQuery({ queryKey: ['nostr', 'logins', logins.map((l) => l.id).join(';')], - queryFn: async ({ signal }) => { + queryFn: async () => { const events = await nostr.query( [{ kinds: [0], authors: logins.map((l) => l.pubkey) }], - { signal: AbortSignal.any([signal, AbortSignal.timeout(1500)]) }, + { signal: AbortSignal.timeout(1500) }, ); return logins.map(({ id, pubkey }): Account => { diff --git a/src/hooks/useZaps.ts b/src/hooks/useZaps.ts index 2fbfae5..d3b810a 100644 --- a/src/hooks/useZaps.ts +++ b/src/hooks/useZaps.ts @@ -47,10 +47,10 @@ export function useZaps( // Only refetch if the query is currently being observed (component is mounted) return query.getObserversCount() > 0 ? 60000 : false; }, - queryFn: async (c) => { + queryFn: async () => { if (!actualTarget) return []; - const signal = AbortSignal.any([c.signal, AbortSignal.timeout(5000)]); + const signal = AbortSignal.timeout(5000); // Query for zap receipts for this specific event if (actualTarget.kind >= 30000 && actualTarget.kind < 40000) {