handleConnect
Handling Connect and Disconnect
The SDK provides simple functions to handle wallet connection and disconnection, allowing you to manage the user's session and UI state effectively.
Connecting the Wallet
Use the connect
function from the useWallet
hook to open the wallet connection popup. This function returns a promise that resolves when the user connects their wallet.
Disconnecting the Wallet
Use the disconnect
function from the useWallet
hook to disconnect the user's wallet and clear the session.
Example: Connect/Disconnect Button
Last updated