Terraswap JS Error

I am not sure how to fix this.I went through the guthub test files and still couldn’t figure out why this error occurs.

1 Like

well, seems that one symbol you are trying to give to the code is an object instead of a string.
see “[object Object],bLuna”

this is every where I have used the TerraSwap object.I don’t see where I went wrong
I tried the string thing(’’) and it still shoots out the same error.

what is “pp”? not familiar with terraswapjs, but pretty sure queryReverseSimulationBySymbol does not accept “pp” object as the first argument.
just checked - terraswapjs is some small library, you better ask specific to this lib questions in their github https://github.com/Green7/terraswap.js

pp was me trying to troubleshoot it,but no luck.
is there any other way I can query pair price and swap using JS?
like you said,this a some small library,so I am assuming you might be aware of other libraries that do the same?

fair enough, you can use terra.js for swapping https://docs.terra.money/docs/develop/sdks/terra-js/common-examples.html#swapping-using-the-market-module