From f65e971cf4d0c2dea77c9d45dc36d92a5841b0b7 Mon Sep 17 00:00:00 2001 From: Javier Date: Fri, 30 Oct 2015 12:55:41 -0300 Subject: [PATCH] fix emit call --- src/js/controllers/index.js | 10 +++------- src/js/controllers/preferencesInformation.js | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index 521c1ca36..79475fb35 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -1006,13 +1006,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r // UX event handlers $rootScope.$on('Local/ClearHistory', function(event, walletId) { - storageService.removeTxHistory(walletId, function(err) { - if (err) root.showErrorPopup(err); - - $log.debug('The wallet transaction history has been deleted'); - self.txHistory = []; - self.updateHistory(); - }); + $log.debug('The wallet transaction history has been deleted'); + self.txHistory = []; + self.updateHistory(); }); $rootScope.$on('Local/ColorUpdated', function(event) { diff --git a/src/js/controllers/preferencesInformation.js b/src/js/controllers/preferencesInformation.js index 6dc5141be..22bdaeabe 100644 --- a/src/js/controllers/preferencesInformation.js +++ b/src/js/controllers/preferencesInformation.js @@ -98,8 +98,9 @@ angular.module('copayApp.controllers').controller('preferencesInformation', storageService.removeTxHistory(c.walletId, function(err) { if (err) return $log.err(err); + $scope.$emit('Local/ClearHistory'); + $timeout(function() { - $scope.$emit('Local/ClearHistory'); go.walletHome(); }, 100); });