implement cache for key derivation, using user-agent
This commit is contained in:
parent
02861992e6
commit
d08d4e3650
4 changed files with 14 additions and 14 deletions
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue