From 0128a80075809a138a9521bf666e7e31a47a055c Mon Sep 17 00:00:00 2001 From: Carlos Andres Perez Ubeda Date: Thu, 5 Dec 2024 14:43:29 -0600 Subject: [PATCH] fix: logout validation --- src/components/loginModal/modal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/loginModal/modal.tsx b/src/components/loginModal/modal.tsx index ac0b36e1..d4ae72b1 100644 --- a/src/components/loginModal/modal.tsx +++ b/src/components/loginModal/modal.tsx @@ -38,7 +38,7 @@ export const LoginModal: React.FC = ({ open, onClose }) => { useEffect(() => { (async () => { if (w3?.provider) { - // get accounts from provider + // get accounts from provider const accounts: any = await w3.provider.request({ method: 'eth_accounts' }); @@ -80,8 +80,9 @@ export const LoginModal: React.FC = ({ open, onClose }) => { }; const handleDisconnectWallet = async () => { + console.log('W3', w3.connected) if (sessionData?.authenticated) await logoutExecute() - if (isConnected) await w3?.logout(); + if (w3.connected) await w3?.logout({cleanup: true}); setIsConnected(false); setView('wallet'); };