useCoinbaseWallet
Hook that prompts users to connect their Coinbase Wallet to your dApp.
import { useCoinbaseWallet } from "@thirdweb-dev/react";
The coinbaseWallet also needs to be added in ThirdwebProvider's supportedWallets if you want the wallet to auto-connect on next page load.
Usage
Call the function returned by the useCoinbaseWallet
hook to prompt the user to connect their Coinbase wallet to your dApp.
You can then use the useAddress
hook to get the user's address.
import { useCoinbaseWallet } from "@thirdweb-dev/react";
function App() {
const connectWithCoinbase = useCoinbaseWallet();
return (
<button onClick={() => connectWithCoinbase()}>Connect Coinbase</button>
);
}