fix emit call

This commit is contained in:
Javier 2015-10-30 12:55:41 -03:00
commit f65e971cf4
2 changed files with 5 additions and 8 deletions

View file

@ -1006,14 +1006,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
// UX event handlers // UX event handlers
$rootScope.$on('Local/ClearHistory', function(event, walletId) { $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'); $log.debug('The wallet transaction history has been deleted');
self.txHistory = []; self.txHistory = [];
self.updateHistory(); self.updateHistory();
}); });
});
$rootScope.$on('Local/ColorUpdated', function(event) { $rootScope.$on('Local/ColorUpdated', function(event) {
self.updateColor(); self.updateColor();

View file

@ -98,8 +98,9 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
storageService.removeTxHistory(c.walletId, function(err) { storageService.removeTxHistory(c.walletId, function(err) {
if (err) return $log.err(err); if (err) return $log.err(err);
$timeout(function() {
$scope.$emit('Local/ClearHistory'); $scope.$emit('Local/ClearHistory');
$timeout(function() {
go.walletHome(); go.walletHome();
}, 100); }, 100);
}); });