add fee to tx history

This commit is contained in:
Matias Alejo Garcia 2015-07-17 14:30:55 -03:00
commit 73f7d9a22b
3 changed files with 9 additions and 0 deletions

View file

@ -442,6 +442,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
};
self.setTxHistory = function(txs) {
var config = configService.getSync().wallet.settings;
var now = Math.floor(Date.now() / 1000);
var c = 0;
self.txHistoryPaging = txs[self.limitHistory] ? true : false;
@ -453,6 +454,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
tx.rateTs = Math.floor((tx.ts || now) / 1000);
tx.amountStr = profileService.formatAmount(tx.amount); //$filter('noFractionNumber')(
if (tx.fees)
tx.feeStr = profileService.formatAmount(tx.fees) + ' ' + config.unitName;
if (c < self.limitHistory) {
self.txHistory.push(tx);
c++;