Skip to content

Commit

Permalink
fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Aug 19, 2024
1 parent 72ad040 commit 878116d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dexs/dexalot/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseAdapter, FetchOptions, FetchResultV2, SimpleAdapter } from "../../adapters/types";
import { BaseAdapter, FetchOptions, FetchResult, SimpleAdapter } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";
import { httpGet } from "../../utils/fetchURL";

Expand Down Expand Up @@ -27,7 +27,7 @@ const chainToEnv = (chain: CHAIN) => {
const fetchFromChain = (chain: CHAIN) => {
const endpoint = `${historicalVolumeEndpoint}?env=${chainToEnv(chain)}`

return async (options: FetchOptions): Promise<FetchResultV2> => {
return async (_a:any, _t: any, options: FetchOptions): Promise<FetchResult> => {
const dayTimestamp = new Date(options.startOfDay * 1000)
const dateStr = dayTimestamp.toISOString().split('T')[0]
const historicalVolume: IVolumeall[] = await httpGet(endpoint)
Expand All @@ -39,6 +39,7 @@ const fetchFromChain = (chain: CHAIN) => {
.find(dayItem => dayItem.date.split('T')[0] === dateStr)?.volumeusd

return {
timestamp: options.startOfDay,
totalVolume: `${totalVolume}`,
dailyVolume: dailyVolume ? `${dailyVolume}` : undefined,
};
Expand Down

0 comments on commit 878116d

Please sign in to comment.