add backup warning view to backup flow
This commit is contained in:
parent
82211a5812
commit
33c7e2b297
17 changed files with 123 additions and 72 deletions
|
|
@ -38,6 +38,22 @@ angular.module('copayApp.services')
|
|||
});
|
||||
}
|
||||
|
||||
root.setBackupNeededModalFlag = function(walletId) {
|
||||
storageService.setBackupNeededModalFlag(walletId, true, function(err) {
|
||||
if (err) $log.error(err);
|
||||
$log.debug('Backup warning modal flag stored');
|
||||
root.wallet[walletId].showBackupNeededModal = false;
|
||||
});
|
||||
};
|
||||
|
||||
function _showBackupNeededModal(wallet, cb) {
|
||||
storageService.getBackupNeededModalFlag(wallet.credentials.walletId, function(err, val) {
|
||||
if (err) $log.error(err);
|
||||
if (val) return cb(false);
|
||||
return cb(true);
|
||||
});
|
||||
};
|
||||
|
||||
root.setBackupFlag = function(walletId) {
|
||||
storageService.setBackupFlag(walletId, function(err) {
|
||||
if (err) $log.error(err);
|
||||
|
|
@ -101,6 +117,10 @@ angular.module('copayApp.services')
|
|||
wallet.balanceHidden = val;
|
||||
});
|
||||
|
||||
_showBackupNeededModal(wallet, function(val) {
|
||||
wallet.showBackupNeededModal = val;
|
||||
});
|
||||
|
||||
wallet.removeAllListeners();
|
||||
|
||||
wallet.on('report', function(n) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue