From c42205c1de0b00fa8a4d9843f7e784a30457a080 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Mon, 23 Feb 2015 17:15:38 -0300 Subject: [PATCH] add proposal info --- bit-wallet/bit-history | 3 ++- lib/server.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bit-wallet/bit-history b/bit-wallet/bit-history index e372cf9..7f250c2 100755 --- a/bit-wallet/bit-history +++ b/bit-wallet/bit-history @@ -25,6 +25,7 @@ client.getTxHistory({}, function (err, txs) { var time = moment(tx.time * 1000).fromNow(); var amount = Utils.renderAmount(tx.amount); var confirmations = tx.confirmations || 0; + var proposal = tx.proposalId ? '["' + tx.message + '" by ' + tx.creatorName + '] ' : ''; switch (tx.action) { case 'received': direction = '<='; @@ -37,6 +38,6 @@ client.getTxHistory({}, function (err, txs) { break; } - console.log("\t%s: %s %s %s (%s confirmations)", time, direction, tx.action, amount, confirmations); + console.log("\t%s: %s %s %s %s(%s confirmations)", time, direction, tx.action, amount, proposal, confirmations); }); }); diff --git a/lib/server.js b/lib/server.js index f0a2619..a93bef0 100644 --- a/lib/server.js +++ b/lib/server.js @@ -951,6 +951,8 @@ WalletService.prototype.getTxHistory = function(opts, cb) { var proposal = indexedProposals[tx.txid]; if (proposal) { + tx.proposalId = proposal.id; + tx.creatorName = proposal.creatorName; tx.message = proposal.message; tx.actions = _.map(proposal.actions, function(action) { return _.pick(action, ['createdOn', 'type', 'copayerId', 'copayerName', 'comment']);