Add AbortSignal's to things

This commit is contained in:
Alex Gleason committed 2025-04-23 15:13:17 -05:00
1 parent 99970309e2
commit 7d81db739c
4 files changed
+13 -17

No files matched your search

+3 -2
View File
@@ -14,11 +14,11 @@ export function useAuthor(pubkey: string | undefined) {
const [event] = await nostr.query(
[{ kinds: [0], authors: [pubkey!], limit: 1 }],
{ signal: AbortSignal.any([signal, AbortSignal.timeout(500)]) },
{ signal: AbortSignal.any([signal, AbortSignal.timeout(1500)]) },
);
if (!event) {
return {};
throw new Error('No event found');
}
try {
@@ -28,5 +28,6 @@ export function useAuthor(pubkey: string | undefined) {
return { event };
}
},
retry: 3,
});
}