polymorpher / one-wallet

1wallet | Modulo OTP Wallet - unconventional keyless, non-custodial wallet secured by Google Authenticator. EVM-compatible, smart contract operated, with composable security.
https://1wallet.crazy.one
Apache License 2.0
109 stars 47 forks source link

Convert 1USDC to ONE gives you wrong value #204

Closed dietbald closed 2 years ago

dietbald commented 2 years ago

When trying to swap 1 1USDC to ONE , it is also impossible to complete the swap

image

polymorpher commented 2 years ago

Was the amount automatically filled? It does not appear so. Also you do not have any 1USDC balance to swap from

dietbald commented 2 years ago

I do have balance in the wallet for it. I thought I actually transfered 1 1USDT and 1 1USDC to the wallet, but I might have been wrong. I also dont seem to see the transaction in the block explorer in the HRC20 tab

The conversion amount was automatically filled and also changes when increased but wrongly

image

polymorpher commented 2 years ago

I will look into this. I think it might be the balance in Swap page is out of sync with the balance on main page. There may be an error on the number of decimal points that are supposed to be used. And the large number is caused by either that or a divide by zero error.

polymorpher commented 2 years ago

@cylim if you have time - feel free to take a look as well

dietbald commented 2 years ago

1usdc, 1usdt and AAVE seem to have similar issue

image image

cylim commented 2 years ago

@dietbald when you select the usdc, there are two USDC, select the one with squared icon instead of the rounded icon.

Screen Shot 2021-12-06 at 16 05 17

Editted: Sorry, if the usdc is send from another address, you might not able to see the squared icon usdc token. A new PR is submmitted to resolve this issues.

cylim commented 2 years ago

@polymorpher After removing the default tokens, the AAVE pricing still incorrect, probably because of liquidity issues in Sushi Swap. I need to spend more time to look into it.

And we might need to update icons for some tokens.

Updated: It seems complicated, if user send token to the address, the tokens might not tracked, that might be the reason why default erc20 tokens are added to the list.

dietbald commented 2 years ago

@cylim I get the error for both of the Tokens, see in the picture, also the balance doesnt seem to come through as well

image image

image

polymorpher commented 2 years ago

@dietbald the latest changes should have fixed some related issues, but I am not sure whether they are exactly the issues you faced. Can you check?

One thing I noticed on your screenshot is 1USDC and UST don't have any icons, which suggest that they might not be the USDC / UST tracked by 1wallet. Where did you get these tokens?

If the issues still remain, can you record a video?

polymorpher commented 2 years ago

AAVE has insufficient liquidity on Sushiswap. I will update error message (currently this error only shows when you have both amounts in the input boxes)

polymorpher commented 2 years ago

hold on - I am fixing a few other things

polymorpher commented 2 years ago

ready now

polymorpher commented 2 years ago

Let me know if this remains an issue

dietbald commented 2 years ago

All seem to be working great now, thanks