Hey there,
On browser all works fine but when I use mobile it dont even connect.
if (window.ethereum) {
web3 = new Web3(window.ethereum);
}
if (this.isMobile() && !window.ethereum) {
this.connectBtn.addEventListener("click", () => {
window.location.href = `https://metamask.app.link/dapp/${window.location.hostname}${window.location.pathname}`;
});
} else {
this.connectBtn.addEventListener("click", () => {
this.connectWallet(true)
});
this.connectWallet(true);
}
connectWallet = async (connected) => {
await Moralis.enableWeb3();
this.web3Js = new Web3(Moralis.provider);
const web3Js = this.web3Js;
I need help please. Im searching for like 3 hours for an solution. Tried all.
I am using object oriented programming oop