From 1f980201dde2cf9b4e4ec8a0470e49944f797c5d Mon Sep 17 00:00:00 2001 From: enes Date: Tue, 31 Dec 2024 12:09:12 +0100 Subject: [PATCH] fix(login): update login method before using nostrController instance --- src/layouts/Main.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/Main.tsx b/src/layouts/Main.tsx index 3e6be26..5410dec 100644 --- a/src/layouts/Main.tsx +++ b/src/layouts/Main.tsx @@ -58,12 +58,12 @@ export const MainLayout = () => { } const login = useCallback(async () => { + dispatch(updateLoginMethod(LoginMethod.nostrLogin)) + const nostrController = NostrController.getInstance() const authController = new AuthController() const pubkey = await nostrController.capturePublicKey() - dispatch(updateLoginMethod(LoginMethod.nostrLogin)) - const redirectPath = await authController.authAndGetMetadataAndRelaysMap(pubkey)