diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index faf3a335c..8222d5e74 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -279,6 +279,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r return w.id != self.walletId; });; $rootScope.$apply(); + + if (opts.triggerTxUpdate) { + $timeout(function() { + self.updateTxHistory(); + }, 1); + } }); }); }; @@ -862,16 +868,18 @@ angular.module('copayApp.controllers').controller('indexController', function($r }); $rootScope.$on('NewIncomingTx', function() { - self.updateBalance(); - $timeout(function() { - self.updateTxHistory(); - }, 5000); + self.updateAll({ + walletStatus: null, + untilItChanges: true, + triggerTxUpdate: true, + }); }); $rootScope.$on('NewOutgoingTx', function() { self.updateAll({ walletStatus: null, - untilItChanges: true + untilItChanges: true, + triggerTxUpdate: true, }); }); @@ -881,11 +889,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r $rootScope.$on(eventName, function(event, untilItChanges) { self.updateAll({ walletStatus: null, - untilItChanges: untilItChanges + untilItChanges: untilItChanges, + triggerTxUpdate: true, }); - $timeout(function() { - self.updateTxHistory(); - }, 3000); }); });