Hi all, I’ve integrated MetaMask in our DAPP with @web3-react/injected-connector. It works fine on PC/MAC, but on any mobile, it lost connection after reloading the page and couldn’t connect again without another reload. Kindly help me to solve this issue. TIA
Here is my code const connectMetamaskMobile = async () => {
if (typeof window.ethereum === "undefined") {
setIsProvider(true);
} else {
try {
if (isWalletConnect) {
await deactivate();
}
await activate(injected);
setLocalUse(true);
setIsWalletConnect(false);
setIsDisconnected(false);
} catch (error) {
console.log("Error on connecting: ", error);
}
}
}