import { createThirdwebClient } from "thirdweb";
import { createWallet, injectedProvider } from "thirdweb/wallets";
const client = createThirdwebClient({ clientId });
const wallet = createWallet("com.spot-wallet"); // pass the wallet id
// if user has wallet installed, connect to it
if (injectedProvider("com.spot-wallet")) {
await wallet.connect({ client });
}
// open WalletConnect modal so user can scan the QR code and connect
else {
await wallet.connect({
client,
walletConnect: { showQrModal: true },
});
}