limit live transactions in the homepage

This commit is contained in:
Mario Colque 2014-01-29 10:40:49 -03:00
parent 9b7d1d7758
commit 4d69c974c4
1 changed files with 2 additions and 1 deletions

View File

@ -33,9 +33,10 @@ angular.module('insight.system').controller('IndexController',
var txStr = tx.txid.toString();
_getTransaction(txStr);
console.log('Transaction received! ' + JSON.stringify(tx));
if (parseInt($scope.txs.length, 10) >= parseInt(TRANSACTION_DISPLAYED, 10)) {
$scope.txs = $scope.txs.slice(Math.max($scope.txs.length - TRANSACTION_DISPLAYED, 1));
$scope.txs = $scope.txs.splice(0, TRANSACTION_DISPLAYED);
}
});