diff --git a/plugins/idb.js b/plugins/idb.js index 15a857f..38e6292 100644 --- a/plugins/idb.js +++ b/plugins/idb.js @@ -277,7 +277,7 @@ export default async (ctx, inject) => { }, { name: `withdrawals_${token}_${amount}`, - keyPath: 'transactionHash', + keyPath: 'blockNumber', indexes: WITHDRAWAL_INDEXES }, { diff --git a/services/events.js b/services/events.js index 70f302e..7ee6133 100644 --- a/services/events.js +++ b/services/events.js @@ -153,14 +153,6 @@ class EventService { return undefined } - // IndexedDB scrambles assortment - savedEvents.sort((a, b) => { - if (a.leafIndex && b.leafIndex) { - return a.leafIndex - b.leafIndex - } - return a.blockNumber - b.blockNumber - }) - return { events: savedEvents, lastBlock: savedEvents[savedEvents.length - 1].blockNumber