showWalletConnectScanner
Function to show the WalletConnect QR scanner using the Wallet Services plugin.
info
Please note that this function doesn't work for external wallet logins. It only works for social login embedded wallets.
Usage
import { Web3Auth } from '@web3auth/modal'
// After initializing and logging in with Web3Auth
async function openWalletConnectScanner() {
try {
await web3auth.showWalletConnectScanner({
show: true,
})
} catch (error) {
console.error('Error opening WalletConnect scanner:', error)
}
}
Parameters
interface ShowWalletConnectScannerParams {
show: boolean
}
show
boolean
Determines whether the Wallet Connect UI is displayed. This can be used to programmatically control its visibility.
Return type
Promise<void>
The function returns a promise that resolves when the WalletConnect scanner has been displayed or hidden.