status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.91k stars 984 forks source link

Swap fee on mobile does not match to desktop fee for non-approved ERC-20 on onptimism #21707

Open VolodLytvynenko opened 1 day ago

VolodLytvynenko commented 1 day ago

After mergin new endpoints PR the fees are usually aligned for desktop and mobile , Image except when a non-approved ERC-20 token is set up on the swap page using the Optimism network. It's unclear what the expected result should be or on which side the fee estimation went wrong. This seems to be on desktop, as the approval fee is unusually higher than the swap fee, which is strange.

Steps to Reproduce:

  1. Navigate to the swap page using desktop and mobile
  2. Select the Optimism network.
  3. Choose a non-approved ERC-20 token for the transaction.
  4. Observe the fees displayed for approval and swap.

Actual Result:

The approval fee is substantially higher on desktop than on mobile.

Mobile Optimism non-approved USDT -> ETH Image

Desktop Optimism non-approved USDT -> ETH Image

Expected Result:

Approval fee should be comparable to or lower than the swap fee in alignment with typical fee estimation patterns.

VolodLytvynenko commented 1 day ago

more context https://discord.com/channels/1210237582470807632/1232982322874159104/1311706735073038336 Image