mirror of https://github.com/BTCPrivate/copay.git
add delete option in intermediate screen
This commit is contained in:
parent
955220dfbe
commit
1e44ce2cc7
|
@ -138,8 +138,11 @@
|
|||
</div>
|
||||
<div class="large-12 medium-12 small-12 columns">
|
||||
<div class="line-dashed">
|
||||
<a ng-click="dowloadBackup()"
|
||||
ng-show="!$root.wallet.publicKeyRing.isComplete()">Save seed backup</a>
|
||||
<div ng-show="!$root.wallet.publicKeyRing.isComplete()">
|
||||
<a ng-click="dowloadBackup()">Save seed backup</a>
|
||||
|
|
||||
<a ng-click="deleteWallet()">Delete wallet</a>
|
||||
</div>
|
||||
<button class="button primary radius right"
|
||||
ng-click="backup()"
|
||||
ng-show="!$root.wallet.publicKeyRing.isBackupReady()"
|
||||
|
|
|
@ -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',
|
||||
|
@ -96,7 +96,16 @@ angular.module('copayApp.controllers').controller('HeaderController',
|
|||
$scope.dowloadBackup = function() {
|
||||
var w = $rootScope.wallet;
|
||||
backupService.download(w);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.deleteWallet = function() {
|
||||
alert('delete');
|
||||
var w = $rootScope.wallet;
|
||||
w.disconnect();
|
||||
walletFactory.delete(w.id, function() {
|
||||
controllerUtils.logout();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.getVideoURL = function(copayer) {
|
||||
if (config.disableVideo) return;
|
||||
|
|
Loading…
Reference in New Issue