Skip to content

Commit

Permalink
fix jup adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
0xngmi committed Oct 22, 2024
1 parent b36e69e commit 8b39ca6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions aggregators/jupiter-aggregator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import { FetchOptions } from "../../adapters/types";
import { queryDune } from "../../helpers/dune";

const fetch = async (options: FetchOptions) => {
const start = options.startOfDay;
const data = await queryDune("4187430", {
start: start,
end: start + 24 * 60 * 60,
start: options.startTimestamp,
end: options.endTimestamp,
});
const chainData = data[0];
if (!chainData) throw new Error(`Dune query failed: ${JSON.stringify(data)}`);
Expand All @@ -17,9 +16,10 @@ const fetch = async (options: FetchOptions) => {
};

const adapter: any = {
version: 2,
adapter: {
[CHAIN.SOLANA]: {
fetch: (_t: any, _tt: any, options: FetchOptions) => fetch(options),
fetch,
start: 1681599600,
meta: {
methodology: {
Expand All @@ -31,7 +31,6 @@ const adapter: any = {
},
},
},
isExpensiveAdapter: true,
};

export default adapter;

0 comments on commit 8b39ca6

Please sign in to comment.