From 1771374cdea76dff421d5dbf8b973297db1c4f06 Mon Sep 17 00:00:00 2001 From: "Pablo Martin (wdp)" Date: Thu, 3 Jul 2014 14:13:05 +0200 Subject: [PATCH] More detailed default labels for internal transactions. --- html/wallet/history.html | 4 ++-- js/model/history.js | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/html/wallet/history.html b/html/wallet/history.html index d1edd86e..012482fc 100644 --- a/html/wallet/history.html +++ b/html/wallet/history.html @@ -59,10 +59,10 @@
  • Copy hash
  • -
  • +
  • Copy {{currentRow.inMine?'destination':'origin'}} address
  • -
  • +
  • Add {{currentRow.inMine?'destination':'origin'}} address to contact
  • diff --git a/js/model/history.js b/js/model/history.js index 18113c23..2ba16658 100644 --- a/js/model/history.js +++ b/js/model/history.js @@ -66,9 +66,9 @@ History.prototype.buildHistoryRow = function(transaction, height) { var txHash = Bitcoin.convert.bytesToHex(txObj.getHash()); var pocketImpact = {}; - var addPocketImpact = function(pocketId, amount) { + var addPocketImpact = function(pocketId, outPocketType, amount) { if (!pocketImpact.hasOwnProperty(pocketId)) { - pocketImpact[pocketId] = {ins: 0, outs: 0, total: 0}; + pocketImpact[pocketId] = {ins: 0, outs: 0, total: 0, type: outPocketType}; } if (amount > 0) { pocketImpact[pocketId].outs += amount; @@ -81,7 +81,7 @@ History.prototype.buildHistoryRow = function(transaction, height) { // XXX temporary while bitcoinjs-lib supports testnet better txObj = BtcUtils.fixTxVersions(txObj, this.identity); - var inAddress, inPocket, outPocket; + var inAddress, inPocket, outPocket, internal; // Check inputs for(var idx=0; idx