From 10455d20cdf3dbba6cd5710784827767f5492f02 Mon Sep 17 00:00:00 2001 From: Piotr Matlak Date: Thu, 21 Nov 2024 09:38:50 +0100 Subject: [PATCH] update reconnect --- src/containers/HeaderWrapper/HeaderWrapper.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/containers/HeaderWrapper/HeaderWrapper.tsx b/src/containers/HeaderWrapper/HeaderWrapper.tsx index 9ec97de1..bf571140 100644 --- a/src/containers/HeaderWrapper/HeaderWrapper.tsx +++ b/src/containers/HeaderWrapper/HeaderWrapper.tsx @@ -31,25 +31,16 @@ export const HeaderWrapper: React.FC = () => { const eagerConnectToNightly = async () => { try { - console.log('1') changeToNightlyAdapter() - console.log('2') - await sleep(1000) - console.log('3') - // await nightlyConnectAdapter.connect() + await sleep(500) const nightlyAdapter = getSolanaWallet() await nightlyAdapter.connect() - console.log('4') - await sleep(500) - console.log('5') - console.log('nightlyConnectAdapter.connected', nightlyConnectAdapter.connected) + await sleep(1000) if (!nightlyAdapter.connected) { await nightlyAdapter.connect() await sleep(500) } - console.log('nightlyConnectAdapter.connected2', nightlyConnectAdapter.connected) dispatch(walletActions.connect(true)) - console.log('6') } catch (error) { console.error('Error during Nightly eager connection:', error) }