Skip to content

Commit

Permalink
fix adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Aug 14, 2023
1 parent 5ddd93c commit 27f98d1
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions dexs/throne-v3/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Chain } from "@defillama/sdk/build/general";
import { BaseAdapter, BreakdownAdapter, IJSON } from "../../adapters/types";
import { IJSON, SimpleAdapter } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";

import { getGraphDimensions } from "../../helpers/getUniSubgraph";
Expand Down Expand Up @@ -30,18 +29,15 @@ const v3Graph = getGraphDimensions({
});

const v3StartTimes = {
[CHAIN.BASE]: 2146977,
[CHAIN.BASE]: 1691712000,
} as IJSON<number>;

const adapter: BreakdownAdapter = {
breakdown: {
v3: Object.keys(v3Endpoint).reduce((acc, chain) => {
acc[chain] = {
fetch: v3Graph(chain as Chain),
start: async () => v3StartTimes[chain],
};
return acc;
}, {} as BaseAdapter),
const adapter: SimpleAdapter = {
adapter: {
[CHAIN.BASE]: {
fetch: v3Graph(CHAIN.BASE),
start: async () => v3StartTimes[CHAIN.BASE]
},
},
};

Expand Down

0 comments on commit 27f98d1

Please sign in to comment.