Delete wallet function as service
This commit is contained in:
parent
02d5604497
commit
c01cdb8b25
5 changed files with 29 additions and 19 deletions
|
|
@ -52,6 +52,7 @@ angular.module('copayApp.controllers').controller('MoreController',
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$scope.save = function() {
|
||||
w.changeSettings({
|
||||
unitName: $scope.selectedUnit.shortName,
|
||||
|
|
@ -83,12 +84,7 @@ angular.module('copayApp.controllers').controller('MoreController',
|
|||
};
|
||||
|
||||
$scope.deleteWallet = function() {
|
||||
$rootScope.iden.deleteWallet(w.id, function() {
|
||||
notification.info('Wallet deleted', $filter('translate')('wallet deleted'));
|
||||
$rootScope.wallet = null;
|
||||
var lastFocused = $rootScope.iden.profile.getLastFocusedWallet();
|
||||
controllerUtils.bindProfile($scope, $rootScope.iden, lastFocused);
|
||||
});
|
||||
controllerUtils.deleteWallet($scope);
|
||||
};
|
||||
|
||||
$scope.purge = function(deleteAll) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue