MetamaskWalletConfigOptions
type MetamaskWalletConfigOptions = { connectionMethod?: "walletConnect" | "metamaskBrowser"; projectId?: string; recommended?: boolean; wcModal?: { qrModalOptions?: QRModalOptions } | boolean;};
Specify how the connection to metamask app should be established if the user is on a mobile device
There are two options: "walletconnect" and "browser"
"walletconnect" - User will be redirected to MetaMask app and upon successful connection, user can return back to the web page.
"browser" - User will be redirected to MetaMask app and the web page will be opened in MetaMask browser.
Default is "walletconnect"
type connectionMethod = "walletConnect" | "metamaskBrowser";
When connecting MetaMask using the QR Code - Wallet Connect connector is used which requires a project id. This project id is Your project’s unique identifier for wallet connect that can be obtained at cloud.walletconnect.com.
https://docs.walletconnect.com/2.0/web3modal/options#projectid-required
type projectId = string;
If true, the wallet will be tagged as "recommended" in ConnectWallet Modal
type recommended = boolean;
Specify whether to open the official Wallet Connect Modal when connecting the wallet if no injected MetaMask provider is found when connecting the wallet.
This should not be set if you are using ConnectWallet component and only when manually connecting the wallet using a hook like useConnect
.
You can set it to true
or a configuration object to enable the Wallet Connect Modal.
type wcModal = { qrModalOptions?: QRModalOptions } | boolean;