Merge pull request #919 from maraoz/feature/delete-wallet-intermediate
Add delete wallet button at intermediate screen
This commit is contained in:
commit
c2dcd4f44b
2 changed files with 17 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('HeaderController',
|
||||
function($scope, $rootScope, $location, notification, $http, $sce, controllerUtils, backupService) {
|
||||
function($scope, $rootScope, $location, notification, $http, $sce, controllerUtils, backupService, walletFactory) {
|
||||
$scope.menu = [{
|
||||
'title': 'Addresses',
|
||||
'icon': 'fi-address-book',
|
||||
|
|
@ -15,7 +15,7 @@ angular.module('copayApp.controllers').controller('HeaderController',
|
|||
'icon': 'fi-arrow-right',
|
||||
'link': '#/send'
|
||||
}, {
|
||||
'title': 'More...',
|
||||
'title': 'More',
|
||||
'icon': 'fi-download',
|
||||
'link': '#/backup'
|
||||
}];
|
||||
|
|
@ -96,7 +96,15 @@ angular.module('copayApp.controllers').controller('HeaderController',
|
|||
$scope.dowloadBackup = function() {
|
||||
var w = $rootScope.wallet;
|
||||
backupService.download(w);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.deleteWallet = function() {
|
||||
var w = $rootScope.wallet;
|
||||
w.disconnect();
|
||||
walletFactory.delete(w.id, function() {
|
||||
controllerUtils.logout();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getVideoURL = function(copayer) {
|
||||
if (config.disableVideo) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue