adding agreeDisclaimer flag for compatibility
This commit is contained in:
parent
9aeb1ea4fd
commit
b9557d47d2
7 changed files with 74 additions and 57 deletions
|
|
@ -134,7 +134,6 @@ angular.module('copayApp.services')
|
|||
};
|
||||
|
||||
root.loadAndBindProfile = function(cb) {
|
||||
|
||||
storageService.getProfile(function(err, profile) {
|
||||
if (err) {
|
||||
$rootScope.$emit('Local/DeviceError', err);
|
||||
|
|
@ -151,10 +150,13 @@ angular.module('copayApp.services')
|
|||
return root.bindProfile(profile, cb);
|
||||
})
|
||||
} else {
|
||||
if (!profile.agreeDisclaimer)
|
||||
return cb(new Error('NONAGREEDDISCLAIMER: Non agreed disclaimer'));
|
||||
$log.debug('Profile read');
|
||||
return root.bindProfile(profile, cb);
|
||||
storageService.getCopayDisclaimerFlag(function(err, val) {
|
||||
if (!profile.agreeDisclaimer) {
|
||||
if (!val) return cb(new Error('NONAGREEDDISCLAIMER: Non agreed disclaimer'));
|
||||
}
|
||||
$log.debug('Profile read');
|
||||
return root.bindProfile(profile, cb);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -198,6 +198,11 @@ angular.module('copayApp.services')
|
|||
storage.remove('config', cb);
|
||||
};
|
||||
|
||||
//for compatibility
|
||||
root.getCopayDisclaimerFlag = function(cb) {
|
||||
storage.get('agreeDisclaimer', cb);
|
||||
};
|
||||
|
||||
root.setRemotePrefsStoredFlag = function(cb) {
|
||||
storage.set('remotePrefStored', true, cb);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue