Mobile Metamask gives me doubled fee. As you can see on screenshot, max fee is 0.00561, but total fee will be 0.011092. If I call same transaction from the desktop metamask, total fee would be equals to the max fee (0.00561). How can I fix this?
Can you post a screenshot of the MetaMask popup from desktop and also a full screenshot from mobile (not cut off).
As you can see, on desktop max fee equals max amount and Total, but in mobile app Total almost doubles the max fee and max amount.
Can you check how that fee is computed?
As in what is the gas price and what is the gas value.
if looks like that script/code is also computing the gas price?
Yes, I estimate gas manually to prevent transaction from crashing.
can you check the details in metamask to see how that transaction fee was computed? like what is the gas price and what is the gas value
No, but I know that gas limit and gas price (that I passed to tx object) on desktop and mobile was the same.
you can not check that?
Have you tried the equivalent code with the ethers.js library to test? It may be a MetaMask problem also, you could post on their forum.