|
|
@ -101,7 +101,7 @@ Storage.prototype.fetchWallet = function(id, cb) { |
|
|
|
Storage.prototype.storeWallet = function(wallet, cb) { |
|
|
|
this.db.collection(collections.WALLETS).update({ |
|
|
|
id: wallet.id |
|
|
|
}, wallet, { |
|
|
|
}, wallet.toObject(), { |
|
|
|
w: 1, |
|
|
|
upsert: true, |
|
|
|
}, cb); |
|
|
@ -326,11 +326,10 @@ Storage.prototype.storeNotification = function(walletId, notification, cb) { |
|
|
|
|
|
|
|
// TODO: remove walletId from signature
|
|
|
|
Storage.prototype.storeTx = function(walletId, txp, cb) { |
|
|
|
txp.isPending = txp.isPending(); // Persist attribute to use when querying
|
|
|
|
this.db.collection(collections.TXS).update({ |
|
|
|
id: txp.id, |
|
|
|
walletId: walletId |
|
|
|
}, txp, { |
|
|
|
}, txp.toObject(), { |
|
|
|
w: 1, |
|
|
|
upsert: true, |
|
|
|
}, cb); |
|
|
|