From 1566575b0241cdde745e954bbde6641215a9a4bb Mon Sep 17 00:00:00 2001 From: Javier Date: Sat, 4 Jun 2016 16:19:19 -0300 Subject: [PATCH] fix wording --- src/js/controllers/preferencesDeleteWords.js | 39 +++++++++----------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/src/js/controllers/preferencesDeleteWords.js b/src/js/controllers/preferencesDeleteWords.js index 929f3c69f..e810c1e74 100644 --- a/src/js/controllers/preferencesDeleteWords.js +++ b/src/js/controllers/preferencesDeleteWords.js @@ -1,26 +1,23 @@ 'use strict'; -angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', - function(confirmDialog, notification, profileService, go, gettext) { - 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'); +angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', function(confirmDialog, lodash, notification, profileService, go, gettext) { + var self = this; + var fc = profileService.focusedClient; + var msg = gettext('Are you sure you want to delete the recovery phrase?'); + var successMsg = gettext('Recovery phrase deleted'); - if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic) - self.deleted = true; + if (lodash.isEmpty(fc.credentials.mnemonic) && lodash.isEmpty(fc.credentials.mnemonicEncrypted)) + self.deleted = true; - self.delete = function() { - confirmDialog.show(msg, - function(ok) { - if (ok) { - fc.clearMnemonic(); - profileService.updateCredentialsFC(function() { - notification.success(successMsg); - go.walletHome(); - }); - } + self.delete = function() { + confirmDialog.show(msg, function(ok) { + if (ok) { + fc.clearMnemonic(); + profileService.updateCredentialsFC(function() { + notification.success(successMsg); + go.walletHome(); }); - }; - - }); + } + }); + }; +});