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.
This commit is contained in:
parent
ca4e938a75
commit
3104220f1b
3
bin/cli
3
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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user