From cff22557c8e0586ca09dd0984f2b5f53a19da826 Mon Sep 17 00:00:00 2001 From: Crumbs <97379465+0xCrumb@users.noreply.github.com> Date: Sat, 2 Nov 2024 11:05:27 +0000 Subject: [PATCH] fix all time fees for gTrade (#2067) --- fees/gains-network.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fees/gains-network.ts b/fees/gains-network.ts index 921382523..745125023 100644 --- a/fees/gains-network.ts +++ b/fees/gains-network.ts @@ -16,6 +16,7 @@ interface IStats { all_fees: number; borrowing_fee: number; rollover_fee: number; + cumul_fees: number; // all time chain fees // gTokens dai_stakers: number; @@ -25,7 +26,7 @@ interface IStats { // GNS staking gns_stakers: number; } -const requests: any = {} +const requests: any = {}; export async function fetchURLWithRetry(url: string, options: FetchOptions) { const start = options.startTimestamp; @@ -35,8 +36,8 @@ export async function fetchURLWithRetry(url: string, options: FetchOptions) { requests[key] = queryDune("4192496", { start: start, end: end, - }) - return requests[key] + }); + return requests[key]; } const fetch = async (timestamp: number, _: ChainBlocks, options: FetchOptions): Promise => { @@ -48,7 +49,7 @@ const fetch = async (timestamp: number, _: ChainBlocks, options: FetchOptions): chainStat.dev_fund + chainStat.project_fund + chainStat.gns_stakers, chainStat.gns_stakers, chainStat.dai_stakers + chainStat.usdc_stakers + chainStat.weth_stakers, - chainStat.all_fees + chainStat.rollover_fee + chainStat.borrowing_fee, + chainStat.cumul_fees, ] : [0, 0, 0, 0, 0]; @@ -58,7 +59,7 @@ const fetch = async (timestamp: number, _: ChainBlocks, options: FetchOptions): dailyRevenue, dailyHoldersRevenue, dailySupplySideRevenue, - // totalFees, // seem to be wrong + totalFees, }; };