Skip to content

Commit

Permalink
update reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
p6te committed Nov 21, 2024
1 parent 0f1149f commit 10455d2
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/containers/HeaderWrapper/HeaderWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 10455d2

Please sign in to comment.