Browse Source

remove redundancy

activeAddress
Ivan Socolsky 10 years ago
parent
commit
8605805a30
  1. 7
      bit-wallet/bit-history

7
bit-wallet/bit-history

@ -23,15 +23,16 @@ client.getTxHistory({}, function (err, txs) {
_.each(txs, function(tx) { _.each(txs, function(tx) {
var time = moment().fromNow(tx.time); var time = moment().fromNow(tx.time);
var amount = Utils.renderAmount(tx.amount);
switch (tx.action) { switch (tx.action) {
case 'received': case 'received':
console.log("\t%s: <= %s", time, Utils.renderAmount(tx.amount)); console.log("\t%s: <= %s", time, amount);
break; break;
case 'sent': 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; break;
case 'moved': case 'moved':
console.log("\t%s: == %s", time, Utils.renderAmount(tx.amount)); console.log("\t%s: == %s", time, amount);
break; break;
} }
}); });

Loading…
Cancel
Save