deleting wallet with callback

This commit is contained in:
Gustavo Maximiliano Cortez 2014-11-11 12:54:52 -03:00
commit 74b61624e5
4 changed files with 19 additions and 10 deletions

View file

@ -88,7 +88,13 @@ angular.module('copayApp.controllers').controller('MoreController',
};
$scope.deleteWallet = function() {
controllerUtils.deleteWallet($scope);
$scope.loading = true;
controllerUtils.deleteWallet($scope, $rootScope.wallet, function() {
$rootScope.wallet = null;
var lastFocused = $rootScope.iden.getLastFocusedWallet();
controllerUtils.bindProfile($scope, $rootScope.iden, lastFocused);
$scope.loading = false;
});
};
$scope.purge = function(deleteAll) {