From 4d69c974c445822caa78a135804b37178cb14541 Mon Sep 17 00:00:00 2001 From: Mario Colque Date: Wed, 29 Jan 2014 10:40:49 -0300 Subject: [PATCH] limit live transactions in the homepage --- public/js/controllers/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/controllers/index.js b/public/js/controllers/index.js index aa2584d..9816fde 100755 --- a/public/js/controllers/index.js +++ b/public/js/controllers/index.js @@ -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); } });