From 8605805a30a2ea57ebe03ccb2806c2cedff3c6e1 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Sun, 22 Feb 2015 23:36:00 -0300 Subject: [PATCH] remove redundancy --- bit-wallet/bit-history | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bit-wallet/bit-history b/bit-wallet/bit-history index b00c101..8d86a2e 100755 --- a/bit-wallet/bit-history +++ b/bit-wallet/bit-history @@ -23,15 +23,16 @@ client.getTxHistory({}, function (err, txs) { _.each(txs, function(tx) { var time = moment().fromNow(tx.time); + var amount = Utils.renderAmount(tx.amount); switch (tx.action) { case 'received': - console.log("\t%s: <= %s", time, Utils.renderAmount(tx.amount)); + console.log("\t%s: <= %s", time, amount); break; case 'sent': - console.log("\t%s: %s => %s", time, Utils.renderAmount(tx.amount), tx.addressTo); + console.log("\t%s: %s => %s", time, amount, tx.addressTo); break; case 'moved': - console.log("\t%s: == %s", time, Utils.renderAmount(tx.amount)); + console.log("\t%s: == %s", time, amount); break; } });