From 2a46b2e514c65b4cf206ee5c581405acbf0ade5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sojka?= Date: Mon, 23 Sep 2024 19:21:58 +0200 Subject: [PATCH] Polish refactor --- backend/src/events.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/backend/src/events.ts b/backend/src/events.ts index 5546b527..ff2ba30d 100644 --- a/backend/src/events.ts +++ b/backend/src/events.ts @@ -13,9 +13,7 @@ export const getRawVestingEvents = async (contract: string, provider: RpcProvide let cached = getCachedVestingEvents(contract, fromBlock); const newlyFetched = await fetchVestingEvents(contract, provider, cached.lastBlock); - console.log("fetched ", newlyFetched.length, " events") const events = [...cached.events, ...newlyFetched]; - const cacheKey = { contract, fromBlock }; console.log('saving ', newlyFetched.length, ' newly fetched to cache'); cache.set(`${contract}-${fromBlock}`, { events, lastBlock: (await latestBlockPromise).block_number }); return events; @@ -44,8 +42,6 @@ const fetchVestingEvents = async (contract: string, provider: RpcProvider, fromB let res = events.events if (events.continuation_token) { // means we can continue, more to fetch - console.debug('continuing', events.continuation_token); - console.debug(res.length) const nextEvents = await fetchVestingEvents(contract, provider, fromBlock, events.continuation_token); res = [...res, ...nextEvents]; }