From 8afe0009ec585a0d8cecaca34de8545f21546041 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 13 Feb 2015 10:30:58 -0300 Subject: [PATCH] add -v to status --- bit-wallet/bit-status | 9 ++++++--- lib/clilib.js | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bit-wallet/bit-status b/bit-wallet/bit-status index 14c632d..73ee0b6 100644 --- a/bit-wallet/bit-status +++ b/bit-wallet/bit-status @@ -7,6 +7,7 @@ var common = require('./common'); program .version('0.0.1') .option('-c,--config [file]', 'Wallet config filename') + .option('-v,--verbose', 'be verbose') .parse(process.argv); var args = program.args; @@ -14,8 +15,10 @@ var cli = new CliLib({ filename: program.config }); -cli.status(function(err, xx) { +cli.status(function(err, x) { common.die(err); - console.log(' * Status:', xx); -}); + console.log('* Wallet %s [%s]: %d-%d %s ', x.name, x.isTestnet ? 'testnet' : 'livenet', x.m, x.n, x.status); + if (program.verbose) + console.log('* Raw Server Response:\n', x); //TODO +}); diff --git a/lib/clilib.js b/lib/clilib.js index cca1b44..7627e34 100644 --- a/lib/clilib.js +++ b/lib/clilib.js @@ -185,7 +185,6 @@ CliLib.prototype.status = function(cb) { var self = this; var data = this._loadAndCheck(); - console.log('[clilib.js.180:data:]', data); //TODO var url = '/v1/wallets/'; var signature = _signRequest(url, {}, data.signingPrivKey);