Hi,
i might just have not found the right tutorial… but i am currently facing a problem with WalletConnect and iOS/android Trustwallet and others. On PC everything is working… even with walletconnect and ios-trustwallet… but as soon as people connect on mobilephone with walletconnect and trustwallet or other providers, the wallet-connection is working… but everything else not. So for example if they try to “buy a ticket” for the lottery… no message appears on Trustwallet for approving/buying … as it works on pc i can be sure the “base programming” is working.
This is the code i use for let the people buy a ticket:
const currentUser = Moralis.User.current();
if (currentUser) {
window.web3 = await Moralis.Web3.enable();
const userAddress = currentUser.get("ethAddress");
const contrAddress = "0xf8....";
var tickets = parseInt($( "#ticketamount option:selected" ).text())*1000;
let contractinstance = new web3.eth.Contract(abxi, "0xa7.....");
let x = await contractinstance.methods.approve(contrAddress, Moralis.Units.Token(tickets, "18")).send({from:userAddress});
let contract = new web3.eth.Contract(abiy, "0xf8f2......");
let enterlottery = await contract.methods.buy(parseInt($( "#ticketamount option:selected" ).text())).send({from:userAddress});
$("#ticketamount").val("1").change();
}
else
{
alert("Please connect your wallet first");
}
am i anything missing to interact on mobile?
thx and sorry for annoying again haha