cosmology-tech/cosmology

TypeError: routes.map is not a function

wenda13 opened this issue · 2 comments

const routes = {
"poolId": "1",
"tokenOutDenom": "uosmo"
}

const msg = swapExactAmountIn({
sender: '',
routes,
tokenIn: coin(1000, 'uosmo'),
tokenOutMinAmount: 10000
});

I using something right this and get an error routes.map,when I try to use lookupRoutesForTrade,but I dont know what exactly the beliefValue and pair?

routes needs to be an array, did you see this example here https://github.com/cosmology-finance/cosmology/tree/master/packages/core#lookuproutesfortrade ?

believeValue is more for visual stuff, not necessary for anything. Which pair are you referring to?

sorry I dont really understand sir,can you give an example like swap exact 1 atom to osmo?Thanks