From 2373aa136e8f713951bf88c1d7731d685b99fa18 Mon Sep 17 00:00:00 2001 From: 0xgnek <0xgnek@gmail.com> Date: Mon, 17 Jul 2023 14:43:55 +0000 Subject: [PATCH] start time --- dexs/iziswap/index.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dexs/iziswap/index.ts b/dexs/iziswap/index.ts index 3afef1ed6c..76f01bcb53 100644 --- a/dexs/iziswap/index.ts +++ b/dexs/iziswap/index.ts @@ -42,22 +42,17 @@ const fetch = (chain: Chain) => { } }; -const getStartTimestamp = async (chain_id: number) => { - const historical: IVolumeall[] = (await fetchURL(historicalVolumeEndpoint(chain_id)))?.data.data; - const historicalVolume = historical.filter(e => e.chainId === chain_id); - return (new Date(historicalVolume[historicalVolume.length - 1].timestamp).getTime()); -} const adapter: SimpleAdapter = { adapter: { [CHAIN.BSC]: { fetch: fetch(CHAIN.BSC), - start: () => getStartTimestamp(chains[CHAIN.BSC]), + start: async () => 1680739200, customBackfill: customBackfill(CHAIN.BSC as Chain, fetch) }, [CHAIN.ERA]: { fetch: fetch(CHAIN.ERA), - start: () => getStartTimestamp(chains[CHAIN.ERA]), + start: async () => 1680739200, customBackfill: customBackfill(CHAIN.ERA as Chain, fetch) }, },