Merge pull request #4280 from JDonadio/fix/wording

fix wording
This commit is contained in:
Matias Alejo Garcia 2016-06-04 16:22:31 -03:00
commit 952a834fff
1 changed files with 18 additions and 21 deletions

View File

@ -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();
});
};
});
}
});
};
});