From d260d5164f76c196ab60ca502b27984e801cbaca Mon Sep 17 00:00:00 2001 From: Thomas Petersen Date: Fri, 21 Aug 2026 20:42:26 -0400 Subject: [PATCH] fix(projects): keep hooks within file-size gate Preserve merged project fetching behavior while keeping the module below the repository ceiling. Signed-off-by: Thomas Petersen --- desktop/src/features/projects/hooks.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/desktop/src/features/projects/hooks.ts b/desktop/src/features/projects/hooks.ts index 2933f5f985..ee59a451fd 100644 --- a/desktop/src/features/projects/hooks.ts +++ b/desktop/src/features/projects/hooks.ts @@ -175,12 +175,9 @@ export async function fetchProjects( // is the pure, Tauri-free core of this operation. That helper's javadoc // explains the fail-closed tombstone contract and the NIP-OA owner-deletion // relay-side-suppression decision. - let viewerPubkey: string | undefined; - try { - viewerPubkey = (await getIdentity()).pubkey; - } catch { - viewerPubkey = undefined; - } + const viewerPubkey = await getIdentity() + .then((identity) => identity.pubkey) + .catch(() => undefined); const fetcher: FetchProjectEventsExhaustively = fetchExhaustively ?? ((kinds, extraFilter) =>