https://solana-labs.github.io/wallet-adapter/example/ How do I keep my wallet connected and refresh the page without reconnecting?
1 Answer
Solana wallet adapter has the property autoConnect we have to set it to true. and Also have to set cookies on the front end if needed. here is an example.
<ConnectionProvider endpoint="https://api.devnet.solana.com">
<WalletProvider
wallets={wallets}
autoConnect={
cookies.get('_sToken') &&
cookies.get('_Platform') === 'solana'
? true
: false
}
></WalletProvider>
</ConnectionProvider>