implement cache for key derivation, using user-agent

This commit is contained in:
Matias Alejo Garcia 2016-06-01 19:56:47 -03:00
commit d08d4e3650
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
4 changed files with 14 additions and 14 deletions

View file

@ -113,11 +113,14 @@ angular.module('copayApp.services')
};
root.storeProfile = function(profile, cb) {
console.log('[storageService.js.115:storeProfile:]',profile); //TODO
encryptOnMobile(profile.toObj(), function(err, x) {
storage.set('profile', x, cb);
});
};
root.storeProfileThrottled = lodash.throttle(root.storeProfile, 5000);
root.getProfile = function(cb) {
storage.get('profile', function(err, str) {
if (err || !str)
@ -173,14 +176,6 @@ angular.module('copayApp.services')
storage.remove('backup-' + walletId, cb);
};
root.setDerivationTestFlag = function(walletId, ua, cb) {
storage.set('DerivationTest-'+walletId+ua.replace(' ', ''), true, cb);
};
root.getDerivationTestFlag = function(walletId, ua, cb) {
storage.get('DerivationTest-'+walletId+ua.replace(' ', ''), cb);
};
root.setCleanAndScanAddresses = function(walletId, cb) {
storage.set('CleanAndScanAddresses', walletId, cb);
};