cosmology-tech/cosmology

Issue swapping

Closed this issue · 1 comments

bd21 commented

Getting an error trying to swap on testnet

TypeError: Cannot read properties of undefined (reading 'amount')
    at _callee$ (/Users/joel/.nvm/versions/node/v16.14.0/lib/node_modules/cosmology/node_modules/@cosmology/cli/main/commands/swap.js:153:83)
cosmology swap \
	--mnemonic "pass panther local rare exit rule robust feel excuse hold arrange fence" \
	--chainId osmo-test-4 \
	--restEndpoint "https://lcd-test.osmosis.zone" \
	--rpcEndpoint "https://rpc-test.osmosis.zone" \
	--sell osmo \
	--buy atom \
	--value 1 \
	--slippage 1

I am using rest/rpc endpoints from here, is this correct?

you must use capitals for symbol names:

cosmology swap \
 --mnemonic "pass panther local rare exit rule robust feel excuse hold arrange fence" \
 --chainId osmo-test-4 \
 --restEndpoint "https://lcd-test.osmosis.zone" \
 --rpcEndpoint "https://rpc-test.osmosis.zone" \
 --sell OSMO \
 --buy ATOM \
 --value 1 \
 --slippage 1

This should fix it, I just tested and it works.