From 659b17c38843b8a60b9c545d30216b55c9730a7a Mon Sep 17 00:00:00 2001 From: "Alisa | Side.one" Date: Fri, 9 Jun 2023 00:48:27 +0800 Subject: [PATCH] fix: wallet connected update --- src/stores/useWalletStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/useWalletStore.ts b/src/stores/useWalletStore.ts index a7cb9e77..4c8b02d6 100644 --- a/src/stores/useWalletStore.ts +++ b/src/stores/useWalletStore.ts @@ -31,6 +31,8 @@ export const useWalletStore = defineStore('walletStore', { let connected = {} as WalletConnected if (!this.walletIsConnected?.cosmosAddress){ connected = JSON.parse(localStorage.getItem(key) || '{}'); + } else { + connected = this.walletIsConnected } return connected }, @@ -123,8 +125,6 @@ export const useWalletStore = defineStore('walletStore', { disconnect() { const chainStore = useBlockchain(); const key = chainStore.defaultHDPath; - console.log(key, 'key') - console.log(localStorage.getItem(key)) localStorage.removeItem(key); this.$reset() },