mento-protocol / mento-web

A simple DApp for Celo Mento exchanges
https://app.mento.org
Apache License 2.0
22 stars 14 forks source link

Investigate a bug with app.mento.org #124

Closed olenovyk closed 5 months ago

olenovyk commented 6 months ago

Steps to reproduce

  1. Go to app.mento.org
  2. Connect Metamask.
  3. Start swapping any amount from cEUR > axlUSDC

Expected Result

Swap will be completed successfully

Actual Result

An app throughs an error "Unable to prepare swap transaction"

Screenshot 2024-03-19 at 16.42.29.png
olenovyk commented 6 months ago
  1. Roman was trying to swap 100000 cEUR > axlUSDC when he got an error "Unable to execute approval transaction". He was using Gnosis Safe and its wallet connect extension. Roman's error report on discord. I was trying to reproduce with Valora, but was able to successfully swap in both directions. I was able to reproduce an issue with Metamask. However, in my case an error I am seeing is different from Roman's- "Unable to prepare swap transaction" (see the screenshot above).

  2. User has reported yesterday that they are unable to swap 7.5 cUSD > CELO and seeing an error "Unable to prepare swap transaction". User's error report on discord. I was not able reproduce - swap cUSD <> CELO with Metamask worked for me in both directions without issues.

philbow61 commented 6 months ago
  1. It seems like Romans issue is caused by our webApp not working correctly when being connected with a GnosisSafe see : https://www.notion.so/mentolabs/Web-App-issues-0e7995211b4943ccb133e61d0bea03f9 for reference
  2. I wasn't able to recreate the second problem and since the guy is not giving us any additional information I don't think we need to further investigate his problem.
olenovyk commented 6 months ago

@philbow61 Thanks for looking into this. If you read my comment, I was able to reproduce an issue with Metamask. So it doesn't seem to be limited to Gnosis Safe only, therefore seems like it requires further investigation.

olenovyk commented 6 months ago

@philbow61 did you try swapping cEUR > axlUSDC and it worked for you?

philbow61 commented 5 months ago

@olenovyk Yes, I did swap cEUR <-> axlUSDC with small amounts on mainnet using metamask. I also did the same on testnets with large amounts like Roman. Both worked fine I also referenced the corresponding transaction hashs in the mentioned notion page. The only issue I was able to identify/recreate was the GnosisSafe one as described in the notion page. Do you have any more details on how I can recreate your metamask issue?

olenovyk commented 5 months ago

@philbow61 Okay, I think I found out what is wrong at least on my side: I was copypasting the amount I want to swap from the wallet dropdown in the top right corner where we show wallet's balance. Apparently we are rounding up there instead of down, showing user that they have more funds in their account then they actually do. So I was trying to swap larger amount then I had in my account. I will create an issue to change that.

Screenshot 2024-03-22 at 11 32 03