paraswap-sdk icon indicating copy to clipboard operation
paraswap-sdk copied to clipboard

Building a transaction returns a value of 0

Open devdanio opened this issue 3 years ago • 1 comments

I forked the sandbox example to build a transaction using the SDK from here: https://codesandbox.io/s/nameless-snow-1gxn3?file=/src/paraswap_sdk.ts

It works fine going from MATIC -> USDC, but when i change it from USDC -> MATIC it returns a value of 0. Any idea what is going on here ? (specifically referring to the last function getExampleSwapTransaction on line 241)

devdanio avatar Nov 06 '21 15:11 devdanio

Hi there,

USDC is a (x)rc20 token and to swap from an (x)rc20 token, you doesn't need a set value.

tetuaoro avatar Nov 29 '21 05:11 tetuaoro