Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Approval fails with "Out of Gas" Error during swap on arbitrum network for ERC-20 tokens #21332

Open
VolodLytvynenko opened this issue Sep 26, 2024 · 2 comments

Comments

@VolodLytvynenko
Copy link
Contributor

VolodLytvynenko commented Sep 26, 2024

Problem:

When attempting to approve an ERC-20 token (e.g., WBTC, USDC) on the Arbitrum network, the transaction fails with an "out of gas" error despite having sufficient ETH balance (current user has 0.00188 eth = 5 USD, When current transactions estimated as 0.01 USD ) to cover the estimated fees.

Steps to Reproduce:

  1. Go to the swap page.
  2. Select the Arbitrum network.
  3. Choose an ERC-20 token (e.g., WBTC, USDC).
  4. Attempt to approve the token for the swap.

Actual Result:

The transaction fails with an "out of gas" error, and the approval cannot be completed.

Example transaction: Arbiscan link.

desktopswap.mp4

Expected Result:

The approval should be successful, as there is enough balance to cover the gas fees.

Additional Info:

The issue occurs specifically on the Arbitrum network.
The approval works correctly on other networks.

ENV:

Mobile: Nightly 26 sep, 2024
Desktop: Last master: 26 sep, 2024

Logs:

arbitrium (1).txt

@anastasiyaig
Copy link

@saledjenic can you pls help looking at it? Dunno btw if the error below is related but posting just in case

WRN 2024-09-26 11:44:20.937Z qt warning                                 topics="qt" tid=17255438 text="TypeError: Property 'div' of object NaN is not a function" file=qrc:/StatusQ/Core/Utils/AmountsArithmetic.qml:130 category=default
DBG 2024-09-26 11:44:21.205Z [threadpool task thread] initiating task   topics="task-threadpool" tid=17255477 file=threadpool.nim:56 messageType=BuildTokensTaskArg:ObjectType threadid=17255477 task="{\"$type\":\"BuildTokensTaskArg:ObjectType\",\"accounts\":[\"0xf38d2cd3c6ad02dd6f8b68e0a7b2f959819954b6\"],\"storeResult\":true,\"vptr\":105553123597600,\"slot\":\"onAllTokensBuilt\"}"
DBG 2024-09-26 11:44:21.205Z NewBE_callPrivateRPC                       topics="rpc" tid=17255477 file=core.nim:27 rpc_method=wallet_fetchOrGetCachedWalletBalances
ERR 2024-09-26 11:44:21.306Z qt error                                   topics="qt" tid=17255438 text="\ndiv (qrc:/StatusQ/Core/Utils/AmountsArithmetic.qml:128)\nexpression for fromTokenAmount (qrc:/app/AppLayouts/Wallet/popups/swap/SwapModal.qml:455)\nreset (qrc:/app/AppLayouts/Wallet/popups/swap/SwapOutputData.qml:41)\nonSuggestedRoutesReady (qrc:/app/AppLayouts/Wallet/popups/swap/SwapModalAdaptor.qml:237)\nonSuggestedRoutesReady (qrc:/app/AppLayouts/Wallet/stores/SwapStore.qml:26)" file=qrc:/StatusQ/Core/Utils/AmountsArithmetic.qml:128 category=default
Screen.Recording.2024-09-26.at.14.42.33.mov

@anastasiyaig
Copy link

UPD: it is fixed in status-im/status-desktop#16330

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants
@VolodLytvynenko @anastasiyaig and others