You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the getRoutes function from the asdk and passing in an integer as the "fromAmount" parameter the function call fails and returns no clear error message:
In contrast, this does not happen in the getQuote function call.
Examples
This is a success in getQuote (see amount as integer):
constresult=awaitgetQuote({fromChain: 42161,toChain: 10,fromToken: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831',toToken: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1',fromAmount: 10000000// The address from which the tokens are being transferred.fromAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',})
Add support for integers alongside strings for the parameter "fromAmount".
Sidenote
Parameters having different names in RoutesRequest and QuoteRequest is a potential error vector. Just standarize all param names (a.ka instead of having fromChain in getQuote and fromChainId in getRoutes, just use fromChain)
The text was updated successfully, but these errors were encountered:
When using the getRoutes function from the asdk and passing in an integer as the "fromAmount" parameter the function call fails and returns no clear error message:
In contrast, this does not happen in the getQuote function call.
Examples
This is a success in getQuote (see amount as integer):
This is an error in getRoutes:
However, this is a success (notice using string insead of integer):
Solution
Add support for integers alongside strings for the parameter "fromAmount".
Sidenote
Parameters having different names in RoutesRequest and QuoteRequest is a potential error vector. Just standarize all param names (a.ka instead of having fromChain in getQuote and fromChainId in getRoutes, just use fromChain)
The text was updated successfully, but these errors were encountered: