From 8de62b400e9f4dcca5ff91069423d2bc3940ac04 Mon Sep 17 00:00:00 2001 From: highperfocused Date: Mon, 14 Apr 2025 21:36:09 +0200 Subject: [PATCH] show alert when no signing method is found --- lib/utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/utils.ts b/lib/utils.ts index 2e899cd..6c1e2ac 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -57,7 +57,12 @@ export async function signEvent(loginType: string | null, event: NostrEvent): Pr } } } else { - eventSigned = await window.nostr.signEvent(event); + if(window.nostr) { + eventSigned = await window.nostr.signEvent(event); + } else { + alert('No signing method found.') + return null; + } } console.log(eventSigned); return eventSigned;