|
|
@ -663,7 +663,7 @@ Storage.prototype.fetchTxNote = function(walletId, txid, cb) { |
|
|
|
txid: txid, |
|
|
|
}, function(err, result) { |
|
|
|
if (err) return cb(err); |
|
|
|
if (!result || !result.body) return cb(); |
|
|
|
if (!result) return cb(); |
|
|
|
return self._completeTxNotesData(walletId, Model.TxNote.fromObj(result), cb); |
|
|
|
}); |
|
|
|
}; |
|
|
@ -699,7 +699,6 @@ Storage.prototype.fetchTxNotes = function(walletId, opts, cb) { |
|
|
|
this.db.collection(collections.TX_NOTES).find(filter).toArray(function(err, result) { |
|
|
|
if (err) return cb(err); |
|
|
|
var notes = _.compact(_.map(result, function(note) { |
|
|
|
if (!note.body) return; |
|
|
|
return Model.TxNote.fromObj(note); |
|
|
|
})); |
|
|
|
return self._completeTxNotesData(walletId, notes, cb); |
|
|
|