From 094f38c5e9801f32f3fd3ca97e5894e67a4a6f8d Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Tue, 30 Dec 2014 16:20:18 -0300 Subject: [PATCH] giving proper feedback --- js/controllers/profile.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/controllers/profile.js b/js/controllers/profile.js index bc66c2806..8bebdfeae 100644 --- a/js/controllers/profile.js +++ b/js/controllers/profile.js @@ -52,9 +52,9 @@ angular.module('copayApp.controllers').controller('ProfileController', function( return; } $location.path('/'); - setTimeout(function() { + $timeout(function() { notification.error('Success', 'Profile successfully deleted'); - }, 1); + }); }); }; @@ -73,10 +73,10 @@ angular.module('copayApp.controllers').controller('ProfileController', function( identityService.deleteWallet($scope.item, function(err) { if (err) { $scope.loading = null; - $scope.error = err.message; + $scope.error = err.message || err; copay.logger.warn(err); - } - else { + $timeout(function () { $scope.$digest(); }); + } else { $modalInstance.close($scope.item.name || $scope.item.id); } });