From 2dab35700c6c4a9e0d24fdf46cac97844e43cd44 Mon Sep 17 00:00:00 2001 From: 0xgnek <0xgnek@gmail.com> Date: Wed, 28 Aug 2024 12:57:05 +0000 Subject: [PATCH] fix gmx value --- dexs/gmx-v2/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dexs/gmx-v2/index.ts b/dexs/gmx-v2/index.ts index 976328a834..61935a4ba6 100644 --- a/dexs/gmx-v2/index.ts +++ b/dexs/gmx-v2/index.ts @@ -1,5 +1,5 @@ import request, { gql } from "graphql-request"; -import { BreakdownAdapter, Fetch, SimpleAdapter } from "../../adapters/types"; +import { BreakdownAdapter, Fetch, FetchOptions, SimpleAdapter } from "../../adapters/types"; import { CHAIN } from "../../helpers/chains"; import { getUniqStartOfTodayTimestamp } from "../../helpers/getUniSubgraphVolume"; @@ -31,8 +31,8 @@ interface IGraphResponse { }> } -const getFetch = (query: string)=> (chain: string): Fetch => async (timestamp: number) => { - const dayTimestamp = getUniqStartOfTodayTimestamp(new Date((timestamp * 1000))) +const getFetch = (query: string)=> (chain: string): Fetch => async (_tt: number, _t: any, options: FetchOptions) => { + const dayTimestamp = getUniqStartOfTodayTimestamp(new Date((options.startOfDay * 1000))) const dailyData: IGraphResponse = await request(endpoints[chain], query, { id: '1d:' + String(dayTimestamp), period: '1d',