txhistory of received payments show all outputs, including sender's change address

This commit is contained in:
Gregg Zigler 2015-08-05 15:25:54 -07:00
commit 07b9fb3921
2 changed files with 14 additions and 6 deletions

View file

@ -29,11 +29,17 @@
<h4 class="title m0" translate>Details</h4>
<ul class="no-bullet size-14 m0">
<div ng-if="!btx.showSingle"
<div ng-if="btx.action == 'received'">
<li class="line-b p10 oh">
<span class="text-gray" translate>Note</span>:
<span class="right">{{btx.message}}</span>
</li>
</div>
<div ng-if="!btx.showSingle && btx.action != 'received'"
ng-repeat="output in [ btx.outputs.summary ]"
ng-include="'views/includes/output.html'">
</div>
<div ng-if="!btx.showSingle && btx.outputs.summary.showDetails"
<div ng-if="!btx.showSingle && btx.outputs.summary.showDetails && btx.action != 'received'"
ng-repeat="output in btx.outputs.details"
ng-include="'views/includes/output.html'">
</div>

View file

@ -430,10 +430,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r
if (tx.outputs) {
tx.showSingle = false;
tx.outputs.details = lodash.clone(tx.outputs);
tx.amount = lodash.reduce(tx.outputs.details, function(total, o) {
formatAmount(o);
return total + o.amount;
}, 0);
if (tx.action != 'received') {
tx.amount = lodash.reduce(tx.outputs.details, function(total, o) {
formatAmount(o);
return total + o.amount;
}, 0);
}
tx.outputs.summary = {
amount: tx.amount,
message: tx.message,