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

[docs] need to know what liquidity is required for the in-app token swap #3136

Open
augchan42 opened this issue Oct 23, 2024 · 0 comments
Open

Comments

@augchan42
Copy link

augchan42 commented Oct 23, 2024

Summary

Trying to do an in-app swap for a small token, contract address: 0x5988Bf243ADf1b42a2Ec2e9452D144A90b1FD9A9
In app swap calls this API:
https://rpc.walletconnect.org/v1/convert/quotes?projectId=6bcaa0ca1d1e4a65d6c46eb2d1f3f781&amount=310142198149821370737&userAddress=0x888C57DE1960068d822833E2EA48479257E94b0d&from=eip155%3A137%3A0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&to=eip155%3A137%3A0x5988bf243adf1b42a2ec2e9452d144a90b1fd9a9&gasPrice=74249409156

The token uses UniV3 liquidity, so slippage is small even though liquidity is low.
Get the following error in browser console when trying to do a swap.
So, walletconnect RPC should either detect UniV3 liquidity error or provide a better error message to notify how much liquidity is needed and what type (v2?)

{
"status": "FAILED",
"reasons": [
{
"field": "",
"description": "Conversion parameter error: insufficient liquidity"
}
]
}

Link to the related docs page

https://docs.reown.com/appkit/features/swaps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
@augchan42 and others