From 99d418886936929a31fcf9ba68c4c2851ad60f29 Mon Sep 17 00:00:00 2001 From: Piotr Matlak Date: Wed, 20 Nov 2024 18:19:03 +0100 Subject: [PATCH] show console --- src/store/sagas/wallet.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/store/sagas/wallet.ts b/src/store/sagas/wallet.ts index 30f836e7..ecfd78ea 100644 --- a/src/store/sagas/wallet.ts +++ b/src/store/sagas/wallet.ts @@ -25,7 +25,7 @@ import { actions as positionsActions } from '@store/reducers/positions' import { BN } from '@project-serum/anchor' import { WalletAdapter } from '@utils/web3/adapters/types' import { getTokenDetails } from './token' -import { accounts, status } from '@store/selectors/solanaWallet' +import { accounts, status, status } from '@store/selectors/solanaWallet' import { airdropQuantities, airdropTokens, WRAPPED_SOL_ADDRESS } from '@store/consts/static' import { Token as StoreToken } from '@store/consts/types' import airdropAdmin from '@store/consts/airdropAdmin' @@ -388,11 +388,15 @@ export function* init(isEagerConnect: boolean): Generator { // } const wallet2 = yield* call(getWallet) yield* put(actions.setStatus(Status.Init)) + console.log('wallet2.connected', wallet2.connected) if (!wallet2.connected) { yield* put(actions.setStatus(Status.Uninitialized)) return } + const statusWallet = yield* select(status) + console.log('statusWallet', statusWallet) + if (isEagerConnect) { yield* put( snackbarsActions.add({ @@ -475,7 +479,7 @@ export function* handleDisconnect(): Generator { } export function* connectHandler(): Generator { - yield takeLatest(actions.connect, handleConnect) + yield takeLeading(actions.connect, handleConnect) } export function* disconnectHandler(): Generator {