From 6345df1b2aced4e9b0f25befb1504395e0c4be13 Mon Sep 17 00:00:00 2001 From: Bill He Date: Tue, 29 Aug 2023 14:55:52 -0700 Subject: [PATCH] prevent log out during switch accounts --- src/hooks/useAccounts.tsx | 2 +- src/lib/abacus/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/useAccounts.tsx b/src/hooks/useAccounts.tsx index 824bcf0..186b349 100644 --- a/src/hooks/useAccounts.tsx +++ b/src/hooks/useAccounts.tsx @@ -192,7 +192,7 @@ const useAccountsContext = () => { } catch (error) { log('useAccounts/setLocalDydxWallet', error); } - } else if (evmAddress && signerWagmi) { + } else if (evmAddress) { if (!localDydxWallet) { dispatch(setOnboardingState(OnboardingState.WalletConnected)); diff --git a/src/lib/abacus/index.ts b/src/lib/abacus/index.ts index cab38fc..b329787 100644 --- a/src/lib/abacus/index.ts +++ b/src/lib/abacus/index.ts @@ -153,6 +153,7 @@ class AbacusStateManager { // ------ Set Data ------ // setStore = (store: RootStore) => { + this.store = store; this.stateNotifier.setStore(store); };