lifinance / widget

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.
https://li.fi/widget
Apache License 2.0
114 stars 75 forks source link

API is failing on testnet #41

Closed Ankitwasnik closed 1 year ago

Ankitwasnik commented 1 year ago

Hi,

I have integrated the widget into my app. I wanted to test the functionality on the testnet. I have selected the goerli testnet as the source chain and the polygon testnet as the destination chain. I want to swap the ETH from goerli to USDC on the polygon testnet. I am getting errors from the below API.

API: https://staging.li.quest/v1/advanced/routes

Error Message: Access to XMLHttpRequest at 'https://staging.li.quest/v1/advanced/routes' from origin 'http://localhost:3001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

image

I understand this error is because APIs from localhost are being blocked. Is this intentional? How do I fix this issue?

chybisov commented 1 year ago

@Ankitwasnik hi, sometimes this can happen during the redeployment of the staging. Could you please try again and share if the issue is still there?

Ankitwasnik commented 1 year ago

Hi @chybisov. Thanks for responding. The widget is now working for goerli to goerli transfer.

But it is not working for goerli ETH to polygon testnet WETH transfer.

chybisov commented 1 year ago

@Ankitwasnik not every bridge or DEX provides enough liquidity/support their testnets. We recommend testing on cheap chains like Polygon with small amounts.

Ankitwasnik commented 1 year ago

@chybisov Please see the below screenshot.

image

I have tried almost all the pairs on the polygon testnet. Nothing is working for the polygon testnet.

Ankitwasnik commented 1 year ago

I can see in the documentation that LiFi is supporting the transfer of Eth on Goerli to Weth on polygon testnet. See this link This does not work as well.

image

I want to try the cross-chain transfer. Let me know if there is any workaround. @chybisov

chybisov commented 1 year ago

@Ankitwasnik, when I said about Polygon, I meant Polygon Mainnet. Testnets don't have liquidity sometimes and have plenty of other issues.

Ankitwasnik commented 1 year ago

Ok. Thanks @chybisov