fix future times

This commit is contained in:
Matias Alejo Garcia 2015-07-13 13:31:05 -03:00
commit 4ffd6bd351
2 changed files with 6 additions and 21 deletions

View file

@ -433,14 +433,15 @@ angular.module('copayApp.controllers').controller('indexController', function($r
};
self.setTxHistory = function(txs) {
var now = new Date();
var now = Math.floor(Date.now() / 1000);
var c = 0;
self.txHistoryPaging = txs[self.limitHistory] ? true : false;
lodash.each(txs, function(tx) {
tx.ts = tx.minedTs || tx.sentTs;
// no future transaction...
if (tx.ts > now)
ts.ts = now;
// no future transactions...
if (tx.time > now)
tx.time = now;
tx.rateTs = Math.floor((tx.ts || now) / 1000);
tx.amountStr = profileService.formatAmount(tx.amount); //$filter('noFractionNumber')(
if (c < self.limitHistory) {