Create distinct --key & --watch
Creates a separate --key argument to be separate from --watch and avoid confusion.
This commit is contained in:
parent
3104220f1b
commit
126a24479a
12
bin/cli
12
bin/cli
@ -52,16 +52,10 @@ CLI.prototype.createWallet = async function createWallet() {
|
||||
n: this.config.uint('n'),
|
||||
witness: this.config.bool('witness'),
|
||||
passphrase: this.config.str('passphrase'),
|
||||
watchOnly: false,
|
||||
accountKey: null
|
||||
watchOnly: this.config.has('key') ? true : this.config.bool('watch'),
|
||||
accountKey: this.config.str('key')
|
||||
};
|
||||
|
||||
if (this.config.has('watch')) {
|
||||
options.watchOnly = true;
|
||||
if (this.config.str('watch') != 'true')
|
||||
options.accountKey = this.config.str('watch');
|
||||
}
|
||||
|
||||
const wallet = await this.client.createWallet(options);
|
||||
|
||||
this.log(wallet);
|
||||
@ -127,7 +121,7 @@ CLI.prototype.createAccount = async function createAccount() {
|
||||
m: this.config.uint('m'),
|
||||
n: this.config.uint('n'),
|
||||
witness: this.config.bool('witness'),
|
||||
accountKey: this.config.str('watch')
|
||||
accountKey: this.config.str('key')
|
||||
};
|
||||
|
||||
const account = await this.wallet.createAccount(name, options);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user