From 8c893fd9f124e905b398f43f1632ca055a4f0493 Mon Sep 17 00:00:00 2001 From: zmeyer44 Date: Tue, 24 Oct 2023 13:20:09 -0400 Subject: [PATCH] cleared extension req --- components/Modals/Login.tsx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/components/Modals/Login.tsx b/components/Modals/Login.tsx index bd58650..01e477d 100644 --- a/components/Modals/Login.tsx +++ b/components/Modals/Login.tsx @@ -85,17 +85,14 @@ export default function LoginModal() { async function handleLoginNsec() { setIsLoading(true); console.log("loging in"); - if (typeof window.nostr !== "undefined") { - const user = await loginWithSecret(nsec); - if (!user) { - throw new Error("NO auth"); - } - console.log("LOGIN", user); - await loginWithPubkey(nip19.decode(user.npub).data.toString()); - localStorage.setItem("shouldReconnect", "true"); - } else { - alert("MIssing window"); + + const user = await loginWithSecret(nsec); + if (!user) { + throw new Error("NO auth"); } + console.log("LOGIN", user); + await loginWithPubkey(nip19.decode(user.npub).data.toString()); + localStorage.setItem("shouldReconnect", "true"); if (typeof window.webln !== "undefined") { await window.webln.enable();