Merge pull request #3064 from greggzigler/bug/receivedHistoryAmount

txhistory of received payments show non-receiver outputs
This commit is contained in:
Gustavo Maximiliano Cortez 2015-08-10 10:48:07 -03:00
commit 77abe774ac
2 changed files with 18 additions and 7 deletions

View file

@ -430,10 +430,13 @@ 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) {
var total = lodash.reduce(tx.outputs.details, function(total, o) {
formatAmount(o);
return total + o.amount;
}, 0);
if (tx.action != 'received') {
tx.amount = total;
}
tx.outputs.summary = {
amount: tx.amount,
message: tx.message,