Transactions for contracts can be executed on Chrome on the desktop where the Metamask extension is installed, but from Metamask Mobile, the transaction does not proceed to the transaction confirmation screen and the transaction cannot be executed.
This issue may be related to the following topics, but we have already confirmed restarting your smartphone and reinstalling Metamask. It didn’t improve.
- mobile-metamask-not-picking-up-transactions/17220
On the other hand, I’ve looked at other DApps like uniswap and it seems that the transaction to the contract works fine.
My DApps implementation has the following dependencies:
- web3@1.7.3
- @metamask/detect-provider@1.2.0
- typechain@8.0.0
- @typechain/web3-v1@6.0.0
Also, operate the contract with the typescript code generated by the following command.
npx typechain --target ethers-v5 --out-dir src/types/ethers-v5-contracts contract-path
The call to the contract is working and the code looks like this:
return await this.contract.methods.callName().call();
Transactions to contracts, on the other hand, only work on mobile.
alert ("start");
const tx = this.contract.methods.txName(xxx, xxx, xxx)
.send({from: address, value: xxx});
alert ("end");
In this case, we will only see an alert that says only “start”, no “end”, and no transaction confirmation screen.
Is there any solution?