From 3104220f1b253f6b741e3781a5ee71cd79c8c860 Mon Sep 17 00:00:00 2001 From: Daniel McNally Date: Thu, 12 Oct 2017 02:49:12 -0400 Subject: [PATCH] Allow --watch without accountKey value Fixes a bug with `cli wallet create` where if no value is specified for the --watch option, the accountKey is assigned a value of "true" which is invalid and causes errors downstream. This fix leaves accountKey as null, and the resulting functionality appears to match wallet creation via HTTP request where `watchOnly` is true and `accountKey` is not given a value. --- bin/cli | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cli b/bin/cli index 77abe537..bb438fa5 100755 --- a/bin/cli +++ b/bin/cli @@ -58,7 +58,8 @@ CLI.prototype.createWallet = async function createWallet() { if (this.config.has('watch')) { options.watchOnly = true; - options.accountKey = this.config.str('watch'); + if (this.config.str('watch') != 'true') + options.accountKey = this.config.str('watch'); } const wallet = await this.client.createWallet(options);