From 054a399f23b7d9a4169f74bc38b8d13f9a51bb99 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 17 Aug 2023 13:19:36 -0500 Subject: [PATCH] queries: reduce getFollows timeout to 1s --- src/queries.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/queries.ts b/src/queries.ts index 633f9ee..2012c18 100644 --- a/src/queries.ts +++ b/src/queries.ts @@ -18,8 +18,8 @@ const getAuthor = async (pubkey: string, timeout = 1000): Promise | und }; /** Get users the given pubkey follows. */ -const getFollows = async (pubkey: string): Promise | undefined> => { - const [event] = await getFiltersMixer([{ authors: [pubkey], kinds: [3] }], { timeout: 5000 }); +const getFollows = async (pubkey: string, timeout = 1000): Promise | undefined> => { + const [event] = await getFiltersMixer([{ authors: [pubkey], kinds: [3] }], { timeout }); return event; };