Capitalisk / ldpos-commander

CLI client for LDPoS blockchains
MIT License
3 stars 2 forks source link

If the command is typed incorrectly, the client seems to get stuck without prompting #16

Closed jondubois closed 3 years ago

jondubois commented 3 years ago

I typed the command incorrectly as account balance clsk1828117832a10af9ba2564eb29a3006b67c4d851 (added the wallet address at the end) and ldpos-commander got stuck.

maarteNNNN commented 3 years ago

If found that bug was related to changes I made to cli-builder. I had to make it work for the SocketCluster cli. That cli needs to pass arguments to the function, while in ldpos-commander the client argument is bound (Function.prototype.bind) via an Array options.bindActionArgs. This is resolved in commit 9e5b279b898d8d5044e241a9bfcfc79828fbad5e. I did an additional bugfix if not entering a passphrase the REPLClient binds the options.bindActionArgs to the action functions outside the try catch block, because the client will not connect.