Merge pull request #167 from colkito/fix/limit-live-transactions-homepage
limit live transactions in the homepage
This commit is contained in:
commit
b04e9f2989
|
@ -33,9 +33,10 @@ angular.module('insight.system').controller('IndexController',
|
||||||
var txStr = tx.txid.toString();
|
var txStr = tx.txid.toString();
|
||||||
_getTransaction(txStr);
|
_getTransaction(txStr);
|
||||||
|
|
||||||
|
|
||||||
console.log('Transaction received! ' + JSON.stringify(tx));
|
console.log('Transaction received! ' + JSON.stringify(tx));
|
||||||
if (parseInt($scope.txs.length, 10) >= parseInt(TRANSACTION_DISPLAYED, 10)) {
|
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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue