0

https://solana-labs.github.io/wallet-adapter/example/ How do I keep my wallet connected and refresh the page without reconnecting?

1 Answer 1

0

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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.