From 576683f0d2fd4f2da592cae264d1d733dccb4877 Mon Sep 17 00:00:00 2001 From: Matthew Zipkin Date: Wed, 21 Nov 2018 12:25:10 -0800 Subject: [PATCH] bwallet-cli: require account-key if watch-only --- bin/bwallet-cli | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/bwallet-cli b/bin/bwallet-cli index 6bd5f67..44f982d 100755 --- a/bin/bwallet-cli +++ b/bin/bwallet-cli @@ -83,6 +83,11 @@ class CLI { accountKey: this.config.str('account-key') }; + if (options.watchOnly && !options.accountKey) { + this.log('Account key required when creating watch-only wallet'); + return; + } + const wallet = await this.client.createWallet(id, options); this.log(wallet);