Enable cache for bitpay card

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-28 21:09:41 -03:00
commit 104209de5d
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
7 changed files with 91 additions and 45 deletions

View file

@ -337,6 +337,18 @@ angular.module('copayApp.services')
storage.remove('bitpayCard-' + network, cb);
};
root.setBitpayCardCache = function(network, data, cb) {
storage.set('bitpayCardCache-' + network, data, cb);
};
root.getBitpayCardCache = function(network, cb) {
storage.get('bitpayCardCache-' + network, cb);
};
root.removeBitpayCardCache = function(network, cb) {
storage.remove('bitpayCardCache-' + network, cb);
};
root.removeAllWalletData = function(walletId, cb) {
root.clearLastAddress(walletId, function(err) {
if (err) return cb(err);