Add delete wallet from the intermediate screen (it was lost in migration to new design)

This commit is contained in:
Gustavo Maximiliano Cortez 2014-08-06 16:51:45 -03:00
commit e264aa66a2
4 changed files with 17 additions and 4 deletions

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('CopayersController',
function($scope, $rootScope, $location, backupService) {
function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils) {
$scope.backup = function() {
var w = $rootScope.wallet;
@ -18,4 +18,12 @@ angular.module('copayApp.controllers').controller('CopayersController',
$location.path('/addresses');
};
$scope.deleteWallet = function() {
var w = $rootScope.wallet;
w.disconnect();
walletFactory.delete(w.id, function() {
controllerUtils.logout();
});
};
});