diff --git a/lib/storage.js b/lib/storage.js index 6682679..e6a43f8 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -46,6 +46,10 @@ Storage.prototype._createIndexes = function() { isPending: 1, txid: 1, }); + this.db.collection(collections.TXS).createIndex({ + walletId: 1, + createdOn: -1, + }); this.db.collection(collections.NOTIFICATIONS).createIndex({ walletId: 1, id: 1, @@ -65,13 +69,7 @@ Storage.prototype._createIndexes = function() { type: 1, key: 1, }); - - - this.db.collection(collections.ADDRESSES).dropIndex({ - walletId: 1 - }); - - this.db.collection(collections.TX_NOTES).dropIndex({ + this.db.collection(collections.TX_NOTES).createIndex({ walletId: 1, txid: 1, });