fix backup done

This commit is contained in:
Javier 2016-02-16 14:15:29 -03:00
parent 9e18060fd8
commit 6bf4d9753d
1 changed files with 7 additions and 4 deletions

View File

@ -143,9 +143,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.openWallet();
} else {
storageService.getBackupFlag(self.walletId, function(err, val) {
if (!fc.credentials.mnemonic)
self.needsBackup = false;
else
if (!fc.credentials.mnemonic) {
storageService.setBackupFlag(self.walletId, function(err) {
$log.debug('Backup stored');
self.needsBackup = false;
});
} else
self.needsBackup = self.network == 'testnet' ? false : !val;
self.openWallet();
});
@ -1275,7 +1278,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.needsBackup = false;
$log.debug('Backup done');
storageService.setBackupFlag(walletId || self.walletId, function(err) {
$log.debug('Backup done stored');
$log.debug('Backup stored');
});
});