How can i fetch walletconnect uri token through wagmi
My use case is this I’m trying to connect the metamask from a react ap with wagmi but on mobile it is opening the metamask in 2 steps like from the first page when i select wallet and click on connect button it opens walletConnect popup to select wallet again although in desktop its working fine and opening the metamask directly without that popup
Same way i want to implement in mobile case
Here is the code of connect wallet
const connectToWallet = async (item) => {
const wallet = {
7: "injected",
8: "coinbaseWallet",
};
let connectWallet = connectors.find((f) => f.id === wallet[item.id]);
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
if (isMobile && !window.ethereum) {
connectWallet = connectors.find((f) => f.id === "walletConnect");
}
if (!isConnected) {
try {
connect({ connector: connectWallet });
localStorage.setItem("connectedWallet", connectWallet.name);
setIsSignIn(true);
// Now you are connected to MetaMask
} catch (error) {
console.error("Error connecting to wallet:", error);
toastError(error);
}
} else {
if (connectWallet.name === storedWallet) {
signMessage();
} else {
toastError("Already connected to another wallet");
}
}
};
Also here is the screenshot of popup which i dont want to show