i have a few codes that works fine on chrome desktop but dosent work with metamask mobile im using web3.js 1.2.7 here is code for connecting to wallet :
import Web3 from 'web3';
var web3 = new Web3(window.ethereum);
ConnectedAccount = await window.ethereum.request({
"method": "eth_requestAccounts",
"params": []
});
const MaticTokenContract = new web3.eth.Contract(MaticABI, MaticContractAddress , {from : ConnectedAccount})
on the desktop its work fine but on the metamask mobile dosent work also i have deployed contract that functions works fine on desktop but on mobile its not working im trying to get approve token and then call Buy function
const PreSaleContract = new web3.eth.Contract(ABI , PreSaleContractAddress );
const Token = new web3.eth.Contract(TokenABI , TokenAddress );
await Token.methods.approve(PreSaleContractAddress, 369369369000000).send({from: ConnectedAccount});
on desktop approval works fine but on mobile when clicking on approval button its not working , its should open metamask popup and ask for approval but does noting
Update 1 i have switched to ether.js v5 but again in mobile dosent work in desktop its work fine i have create matic token instance and trying to get wallet address balance and token decimals in dekstop its ok and working fine but in metamask mobile no reaction