Matias Alejo Garcia
9 years ago
No known key found for this signature in database
GPG Key ID: 2470DB551277AB3
1 changed files with
25 additions and
0 deletions
-
lib/storage.js
|
|
@ -609,6 +609,31 @@ Storage.prototype.storeActiveAddresses = function(walletId, addresses, 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) { |
|
|
|
var self = this; |
|
|
|
|
|
|
|