Skip to content

Commit

Permalink
fix gmx value
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Aug 28, 2024
1 parent a91e6c1 commit 2dab357
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dexs/gmx-v2/index.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 2dab357

Please sign in to comment.