homepage: fixed, only show 5 elements (it is!)

This commit is contained in:
Gustavo Cortez 2014-01-22 00:22:04 -03:00
parent 0cf69ddd13
commit fe517b33a5
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ angular.module('insight.system').controller('IndexController',
socket.on('tx', function(tx) { socket.on('tx', function(tx) {
var txStr = tx.txid.toString(); var txStr = tx.txid.toString();
console.log('Transaction received! ' + JSON.stringify(tx)); console.log('Transaction received! ' + JSON.stringify(tx));
if (parseInt($scope.txs.length) === parseInt(TRANSACTION_DISPLAYED)) { if (parseInt($scope.txs.length) > parseInt(TRANSACTION_DISPLAYED) - 1) {
$scope.txs.pop(); $scope.txs.pop();
} }
getTransaction(txStr); getTransaction(txStr);
@ -40,7 +40,7 @@ angular.module('insight.system').controller('IndexController',
socket.on('block', function(block) { socket.on('block', function(block) {
var blockHash = block.hash.toString(); var blockHash = block.hash.toString();
console.log('Block received! ' + JSON.stringify(block)); console.log('Block received! ' + JSON.stringify(block));
if (parseInt($scope.blocks.length) === parseInt(BLOCKS_DISPLAYED)) { if (parseInt($scope.blocks.length) > parseInt(BLOCKS_DISPLAYED) - 1) {
$scope.blocks.pop(); $scope.blocks.pop();
} }
getBlock(blockHash); getBlock(blockHash);