isolate change specific to action = received

This commit is contained in:
Gregg Zigler 2015-08-06 07:23:47 -07:00
commit 949550c35d
2 changed files with 15 additions and 12 deletions

View file

@ -430,11 +430,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r
if (tx.outputs) {
tx.showSingle = false;
tx.outputs.details = lodash.clone(tx.outputs);
var total = 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.amount = total;
}
tx.outputs.summary = {
amount: tx.amount,