Skip to content

Commit

Permalink
Merge pull request #1809 from Nesopie/fix/garden-fee-url
Browse files Browse the repository at this point in the history
fix: garden fee url
  • Loading branch information
dtmkeng committed Aug 22, 2024
2 parents 6a45514 + 2e24c7f commit 76e8903
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fees/garden/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ const chainMapper: Record<string, string> = {
[CHAIN.ARBITRUM]: "ethereum_arbitrum",
};

const baseUrl = "http://leaderboard.garden.finance";
const baseUrl = "https://referral.garden.finance";

const feeUrl = (chain: string, timestamp: number, interval?: string) =>
`${baseUrl}/fee?chain=${chain}&end=${timestamp}${
interval ? `&interval=${interval}` : ""
}`;

type IApiFeeResponse = {
type ApiFeeResponse = {
data: {
fee: string;
};
};

const fetch = (chain: string) => async ({ endTimestamp }: FetchOptions) => {
const dailyFeeResponse: IApiFeeResponse = (
const dailyFeeResponse: ApiFeeResponse = (
await fetchURL(feeUrl(chainMapper[chain], endTimestamp, "day"))
);

const totalFeeResponse: IApiFeeResponse = (
const totalFeeResponse: ApiFeeResponse = (
await fetchURL(feeUrl(chainMapper[chain], endTimestamp))
);

Expand Down

0 comments on commit 76e8903

Please sign in to comment.