Skip to content

Commit

Permalink
fix sushiswap
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Oct 19, 2024
1 parent 6802c9c commit 1866677
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion dexs/sushiswap/trident.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as sdk from "@defillama/sdk";
import request, { gql } from "graphql-request";
import { CHAIN } from "../../helpers/chains";
import { getStartTimestamp } from "../../helpers/getStartTimestamp";
import { FetchOptions } from "../../adapters/types";

const endpointsTrident: Record<string, string> = {
Expand Down Expand Up @@ -44,6 +43,7 @@ const trident = Object.keys(endpointsTrident).reduce(
getStartBlock(),
getEndBlock()
])
try {
const beforeRes = await request(endpointsTrident[chain], tridentQuery, {
number: startBlock,
});
Expand All @@ -59,6 +59,14 @@ const trident = Object.keys(endpointsTrident).reduce(
dailyFees: afterRes.factory.feesUSD - beforeRes.factory.feesUSD,
dailyUserFees: afterRes.factory.feesUSD - beforeRes.factory.feesUSD
}
} catch {
return {
dailyVolume: 0,
dailyFees: 0,
dailyUserFees: 0
}
}

},
start: 1711982400,
},
Expand Down

0 comments on commit 1866677

Please sign in to comment.