Fix backup flag

This commit is contained in:
Gustavo Maximiliano Cortez 2015-11-11 17:52:29 -03:00
commit 51348d5767
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF

View file

@ -12,7 +12,6 @@ angular.module('copayApp.controllers').controller('wordsController',
if (fc.isPrivKeyEncrypted()) self.credentialsEncrypted = true; if (fc.isPrivKeyEncrypted()) self.credentialsEncrypted = true;
else { else {
setWords(fc.getMnemonic()); setWords(fc.getMnemonic());
$rootScope.$emit('Local/BackupDone');
} }
if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic) { if (fc.credentials && !fc.credentials.mnemonicEncrypted && !fc.credentials.mnemonic) {
self.deleted = true; self.deleted = true;
@ -20,8 +19,11 @@ angular.module('copayApp.controllers').controller('wordsController',
self.toggle = function() { self.toggle = function() {
self.error = ""; self.error = "";
if (!self.credentialsEncrypted) if (!self.credentialsEncrypted) {
if (!self.show)
$rootScope.$emit('Local/BackupDone');
self.show = !self.show; self.show = !self.show;
}
if (self.credentialsEncrypted) if (self.credentialsEncrypted)
self.passwordRequest(); self.passwordRequest();