Skip to content

Commit

Permalink
fix vooi
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Jul 24, 2024
1 parent c45b8ab commit 0094c83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aggregator-derivatives/vooi/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fetchURL from "../../utils/fetchURL";
import { FetchResult, FetchResultV2, SimpleAdapter } from "../../adapters/types";
import { FetchResult } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";

const URL = "https://defilama-stats.vooi.workers.dev/";
Expand All @@ -11,12 +11,12 @@ interface IAPIResponse {
dailyVolume: string;
totalVolume: string;
}
const fetch = async (options: any): Promise<FetchResultV2> => {
let timestamp = options.toTimestamp
const fetch = async (timestamp: number): Promise<FetchResult> => {
const { dailyVolume, totalVolume }: IAPIResponse = (
(await fetchURL(`${URL}${endpoint}?ts=${timestamp}`)).data
);
return {
timestamp,
dailyVolume,
totalVolume,
};
Expand All @@ -29,5 +29,5 @@ export default {
start: startTimestamp
},
},
version: 2
// version: 2 // data accepts only one input to timestamp
}

0 comments on commit 0094c83

Please sign in to comment.