+
+
+
+ Wallet: {{index.walletName}}
+ ({{index.alias}})
+
+
Warning!
+
+
+ {{preferences.error|translate}}
+
+
+
+
+ Once you have copied your wallet seed down, it is recommended to delete it from this device.
+
+
+
+
diff --git a/public/views/securityPreferences.html b/public/views/securityPreferences.html
new file mode 100644
index 000000000..f9754ff50
--- /dev/null
+++ b/public/views/securityPreferences.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ -
+
+
Delete seed words
+
+
+
diff --git a/src/js/controllers/preferencesDeleteWords.js b/src/js/controllers/preferencesDeleteWords.js
new file mode 100644
index 000000000..6c14ba9ea
--- /dev/null
+++ b/src/js/controllers/preferencesDeleteWords.js
@@ -0,0 +1,23 @@
+'use strict';
+
+angular.module('copayApp.controllers').controller('preferencesDeleteWordsController',
+ function($scope, $rootScope, $filter, $timeout, $modal, $log, confirmDialog, storageService, notification, profileService, isCordova, go, gettext, gettextCatalog, animationService) {
+ var self = this;
+ var fc = profileService.focusedClient;
+ var msg = gettext('Are you sure you want to delete the backup words?');
+ var successMsg = gettext('Backup words deleted');
+
+ self.delete = function() {
+ confirmDialog.show(msg,
+ function(ok) {
+ if (ok) {
+ fc.clearMnemonic();
+ profileService.updateCredentialsFC(function() {
+ notification.success(successMsg);
+ go.walletHome();
+ });
+ }
+ });
+ };
+
+ });
diff --git a/src/js/controllers/securityPreferences.js b/src/js/controllers/securityPreferences.js
new file mode 100644
index 000000000..b864ae2eb
--- /dev/null
+++ b/src/js/controllers/securityPreferences.js
@@ -0,0 +1,12 @@
+'use strict';
+
+angular.module('copayApp.controllers').controller('securityPreferencesController',
+ function($scope, profileService) {
+ var self = this;
+ var fc = profileService.focusedClient;
+ self.deleted = false;
+ if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic) {
+ self.deleted = true;
+ }
+
+ });
diff --git a/src/js/routes.js b/src/js/routes.js
index 44f7ca551..0e2da59b8 100644
--- a/src/js/routes.js
+++ b/src/js/routes.js
@@ -286,6 +286,18 @@ angular
}
})
+ .state('securityPreferences', {
+ url: '/securityPreferences',
+ templateUrl: 'views/securityPreferences.html',
+ walletShouldBeComplete: true,
+ needProfile: true,
+ views: {
+ 'main': {
+ templateUrl: 'views/securityPreferences.html'
+ },
+ }
+ })
+
.state('preferencesAdvanced', {
url: '/preferencesAdvanced',
templateUrl: 'views/preferencesAdvanced.html',
@@ -297,29 +309,30 @@ angular
},
}
})
- .state('preferencesColor', {
- url: '/preferencesColor',
- templateUrl: 'views/preferencesColor.html',
- walletShouldBeComplete: true,
- needProfile: true,
- views: {
- 'main': {
- templateUrl: 'views/preferencesColor.html'
- },
- }
- })
- .state('preferencesAltCurrency', {
- url: '/preferencesAltCurrency',
- templateUrl: 'views/preferencesAltCurrency.html',
+ .state('preferencesColor', {
+ url: '/preferencesColor',
+ templateUrl: 'views/preferencesColor.html',
walletShouldBeComplete: true,
needProfile: true,
views: {
'main': {
- templateUrl: 'views/preferencesAltCurrency.html'
+ templateUrl: 'views/preferencesColor.html'
},
}
})
+
+ .state('preferencesAltCurrency', {
+ url: '/preferencesAltCurrency',
+ templateUrl: 'views/preferencesAltCurrency.html',
+ walletShouldBeComplete: true,
+ needProfile: true,
+ views: {
+ 'main': {
+ templateUrl: 'views/preferencesAltCurrency.html'
+ },
+ }
+ })
.state('preferencesAlias', {
url: '/preferencesAlias',
templateUrl: 'views/preferencesAlias.html',
@@ -356,6 +369,17 @@ angular
}
})
+ .state('deleteWords', {
+ url: '/deleteWords',
+ templateUrl: 'views/preferencesDeleteWords.html',
+ walletShouldBeComplete: true,
+ needProfile: true,
+ views: {
+ 'main': {
+ templateUrl: 'views/preferencesDeleteWords.html'
+ },
+ }
+ })
.state('delete', {
url: '/delete',
templateUrl: 'views/preferencesDeleteWallet.html',
@@ -379,16 +403,16 @@ angular
})
.state('about', {
- url: '/about',
- templateUrl: 'views/preferencesAbout.html',
- walletShouldBeComplete: true,
- needProfile: true,
- views: {
- 'main': {
- templateUrl: 'views/preferencesAbout.html'
- },
- }
- })
+ url: '/about',
+ templateUrl: 'views/preferencesAbout.html',
+ walletShouldBeComplete: true,
+ needProfile: true,
+ views: {
+ 'main': {
+ templateUrl: 'views/preferencesAbout.html'
+ },
+ }
+ })
.state('logs', {
url: '/logs',
templateUrl: 'views/preferencesLogs.html',
@@ -450,14 +474,14 @@ angular
})
.state('add', {
- url: '/add',
- needProfile: true,
- views: {
- 'main': {
- templateUrl: 'views/add.html'
- },
- }
- })
+ url: '/add',
+ needProfile: true,
+ views: {
+ 'main': {
+ templateUrl: 'views/add.html'
+ },
+ }
+ })
.state('cordova', {
url: '/cordova/:status/:isHome',
views: {
@@ -539,7 +563,7 @@ angular
$state.transitionTo('copayers');
event.preventDefault();
- }
+ }
if (!animationService.transitionAnimated(fromState, toState)) {
event.preventDefault();