Wallet/src/js/controllers/preferencesDeleteWords.js
Gabriel Bazán ebedb64237 refactor
2015-11-19 15:15:36 -03:00

23 lines
696 B
JavaScript

'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');
self.delete = function() {
confirmDialog.show(msg,
function(ok) {
if (ok) {
fc.clearMnemonic();
profileService.updateCredentialsFC(function() {
notification.success(successMsg);
go.walletHome();
});
}
});
};
});