From 9c8ec7d3a21f890d73ac18dc84a82e76c99266fe Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 3 Aug 2018 01:17:01 +0900 Subject: [PATCH] Fix tx history --- src/js/services/walletService.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/js/services/walletService.js b/src/js/services/walletService.js index 7ea98600f..cb04ffbe3 100644 --- a/src/js/services/walletService.js +++ b/src/js/services/walletService.js @@ -345,10 +345,6 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim if (!txsFromServer.length) return cb(null, []); - /*var res = lodash.takeWhile(txsFromServer, function(tx) { - return tx.txid != endingTxid; - });*/ - return cb(null, txsFromServer); }); }; @@ -459,8 +455,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim } // Check if new txs are founds, if yes, lets investigate in the 50 next - // To be sure we are not missing txs by order (maybe a new tx is after the "endingTxid" - + // To be sure we are not missing txs by sorting (maybe a new tx is after the "endingTxid" var newDiscoveredTxs = res.filter(function (x) { return confirmedTxs.filter(function (confX) { return confX.txid == x.txid; @@ -469,10 +464,6 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim $log.debug('Discovering TXs. Got:' + newDiscoveredTxs.length); - /*var newDiscoveredTxs = lodash.uniq(lodash.union(res, newTxs), function(x) { - return x.txid; - });*/ - var shouldContinue = newDiscoveredTxs.length > 0; // If no new tx, no need to check