sell is working
xud@xud1-simnet-exchangeunion-com:~$ xucli sell 0.1 ltc/btc market
swapped 0.1 LTC with peer order c013d160-00e0-11ea-9604-8906d8f43c82
buy is not
xud@xud1-simnet-exchangeunion-com:~$ xucli buy 0.1 ltc/btc market
/opt/xud/node_modules/yargs/yargs.js:1175
else throw err
^
TypeError: utils_1.orderBuilder is not a function
at Object.exports.builder (/opt/xud/dist/cli/commands/orders/buy.js:6:37)
at Object.runCommand (/opt/xud/node_modules/yargs/lib/command.js:188:35)
at Object.parseArgs [as _parseArgs] (/opt/xud/node_modules/yargs/yargs.js:1090:30)
at Object.get [as argv] (/opt/xud/node_modules/yargs/yargs.js:1024:21)
at Object.<anonymous> (/opt/xud/bin/xucli:40:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
xud@xud1-simnet-exchangeunion-com:~$
Can you try deleting your dist folder, running npm run compile, and then trying again? This looks like an issue with the javascript generated by typescript, and I'd guess that it's not getting fixed automatically because of incremental builds.
Yep, solved.
Maybe npm run compile should clean dist ?
Yeah, that was the old behavior until typescript introduced incremental builds, but this is not the first time I've had to manually delete the dist folder and .tsbuildinfo file to resolve an issue, so I'm thinking it may not be reliable enough for our purposes.
I'm thinking maybe of turning off incremental builds for the compile script, so it recreates the dist folder entirely every time it's run, and then having a compile:dev script that can be used for dev purposes to have faster compile times for faster testing and debugging.
I'm thinking maybe of turning off incremental builds for the compile script, so it recreates the dist folder entirely every time it's run, and then having a compile:dev script that can be used for dev purposes to have faster compile times for faster testing and debugging.
I like the idea.