fetch address
This commit is contained in:
parent
4946583afe
commit
e8a687d59e
|
@ -609,6 +609,31 @@ Storage.prototype.storeActiveAddresses = function(walletId, addresses, cb) {
|
||||||
}, cb);
|
}, cb);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Storage.prototype.storeTxHistoryCache = function(walletId, firstPosition, items, cb) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
self.db.collection(collections.CACHE).findOne({
|
||||||
|
walletId: record.walletId,
|
||||||
|
type: 'historyCache'
|
||||||
|
}, function(err, result) {
|
||||||
|
if (err) return cb(err);
|
||||||
|
result = result || [];
|
||||||
|
|
||||||
|
result
|
||||||
|
self.db.collection(collections.CACHE).update({
|
||||||
|
walletId: record.walletId,
|
||||||
|
type: record.type,
|
||||||
|
key: record.key,
|
||||||
|
}, record, {
|
||||||
|
w: 1,
|
||||||
|
upsert: true,
|
||||||
|
}, next);
|
||||||
|
}, cb);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Storage.prototype.fetchActiveAddresses = function(walletId, cb) {
|
Storage.prototype.fetchActiveAddresses = function(walletId, cb) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue