Skip to content

Commit

Permalink
fix version of dexs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Oct 25, 2024
1 parent ac5499c commit ed77470
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fees/sparkdex-v3-1/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { gql, request } from "graphql-request";
import type { ChainEndpoints, FetchV2 } from "../../adapters/types";
import type { ChainEndpoints, Fetch, FetchOptions, FetchV2 } from "../../adapters/types";
import { Adapter } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";

Expand All @@ -17,8 +17,8 @@ interface IFeeStat {
}

const graphs = (graphUrls: ChainEndpoints) => {
const fetch: FetchV2 = async ({ chain, startTimestamp }) => {
const todaysTimestamp = getTimestampAtStartOfDayUTC(startTimestamp);
const fetch: Fetch = async (_t: any, _:any, options: FetchOptions) => {
const todaysTimestamp = getTimestampAtStartOfDayUTC(options.startOfDay);

const graphQuery = gql`
query MyQuery {
Expand All @@ -30,7 +30,7 @@ const graphs = (graphUrls: ChainEndpoints) => {
}
`;

const graphRes = await request(graphUrls[chain], graphQuery);
const graphRes = await request(graphUrls[options.chain], graphQuery);
const feeStats: IFeeStat[] = graphRes.feeStats;

let dailyFeeUSD = BigInt(0);
Expand Down Expand Up @@ -58,7 +58,7 @@ const methodology = {
};

const adapter: Adapter = {
version: 2,
version: 1,
adapter: {
[CHAIN.FLARE]: {
fetch: graphs(endpoints),
Expand Down

0 comments on commit ed77470

Please sign in to comment.