diff --git a/public/views/preferences.html b/public/views/preferences.html
index 1b905d09e..a75e66212 100644
--- a/public/views/preferences.html
+++ b/public/views/preferences.html
@@ -9,8 +9,8 @@
-
-
- -
-
-
Delete Wallet
-
- -
-
-
Delete seed words
-
-
-
-
-
- Spending Restrictions
-
-
- -
-
-
Request Password
-
- -
-
-
Scan Fingerprint
-
-
-
-
diff --git a/src/js/controllers/preferences.js b/src/js/controllers/preferences.js
index 1701f16be..046d4e6da 100644
--- a/src/js/controllers/preferences.js
+++ b/src/js/controllers/preferences.js
@@ -2,7 +2,13 @@
angular.module('copayApp.controllers').controller('preferencesController',
function($scope, $rootScope, $timeout, $log, configService, profileService) {
-
+
+ var fc = profileService.focusedClient;
+ $scope.deleted = false;
+ if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic) {
+ $scope.deleted = true;
+ }
+
this.init = function() {
var config = configService.getSync();
var fc = profileService.focusedClient;
@@ -37,8 +43,8 @@ angular.module('copayApp.controllers').controller('preferencesController',
});
});
} else {
- if (!val && fc.hasPrivKeyEncrypted()) {
- profileService.unlockFC(function(err){
+ if (!val && fc.hasPrivKeyEncrypted()) {
+ profileService.unlockFC(function(err) {
if (err) {
$scope.encrypt = true;
return;
@@ -70,14 +76,13 @@ angular.module('copayApp.controllers').controller('preferencesController',
opts.touchIdFor[walletId] = newVal;
$rootScope.$emit('Local/RequestTouchid', function(err) {
- if (err) {
+ if (err) {
$log.debug(err);
$timeout(function() {
$scope.touchidError = true;
$scope.touchid = oldVal;
}, 100);
- }
- else {
+ } else {
configService.set(opts, function(err) {
if (err) {
$log.debug(err);
diff --git a/src/js/routes.js b/src/js/routes.js
index 0e2da59b8..b2baef96c 100644
--- a/src/js/routes.js
+++ b/src/js/routes.js
@@ -286,18 +286,6 @@ 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',