diff --git a/fees/apeswap.ts b/fees/apeswap.ts index 70da17e249..c786830bca 100644 --- a/fees/apeswap.ts +++ b/fees/apeswap.ts @@ -9,8 +9,8 @@ const adapterObj = volumeAdapter.adapter; const fetch = (chain: string, totalFees: number, revenueFee: number) => { return async (timestamp: number, chainBlocks: ChainBlocks) => { const fetchedResult = await adapterObj[chain].fetch(timestamp, chainBlocks); - const chainDailyVolume = fetchedResult.dailyVolume || '0'; - const chainTotalVolume = fetchedResult.totalVolume || '0'; + const chainDailyVolume = fetchedResult.dailyVolume as number || '0'; + const chainTotalVolume = fetchedResult.totalVolume as number || '0'; const ssrFee = totalFees - revenueFee const protocolFee = chain === CHAIN.TELOS ? 0.000375 : revenueFee / 2 const buybackFee = revenueFee / 2 diff --git a/fees/verse.ts b/fees/verse.ts index 4f8a98d32e..27a9928840 100644 --- a/fees/verse.ts +++ b/fees/verse.ts @@ -9,8 +9,8 @@ const adapterObj = volumeAdapter.adapter; const fetch = (chain: string, totalFees: number, revenueFee: number, ssrFee: number) => { return async (timestamp: number, chainBlocks: ChainBlocks) => { const fetchedResult = await adapterObj[chain].fetch(timestamp, chainBlocks); - const chainDailyVolume = fetchedResult.dailyVolume; - const chainTotalVolume = fetchedResult.totalVolume; + const chainDailyVolume = fetchedResult.dailyVolume as any; + const chainTotalVolume = fetchedResult.totalVolume as any; return { timestamp, diff --git a/fees/zkswap-finance.ts b/fees/zkswap-finance.ts index c0ac4ebbd6..a78a5ecc43 100644 --- a/fees/zkswap-finance.ts +++ b/fees/zkswap-finance.ts @@ -13,13 +13,12 @@ const fetch = (chain: string, totalFees: number, revenueFee: number) => { const fetchedResult = await adapterObj[chain].fetch(timestamp, chainBlocks); const fetchedResultStartTime = await adapterObj[chain].fetch(FEE_COLLECTED_START_TIME, chainBlocks); - const chainDailyVolume = fetchedResult.dailyVolume || '0'; + const chainDailyVolume = fetchedResult.dailyVolume as number || '0'; const chainTotalVolumeFromFeeCollectedDate = (Number(fetchedResult.totalVolume) - Number(fetchedResultStartTime.totalVolume)) const chainTotalVolume = chainTotalVolumeFromFeeCollectedDate || '0'; const ssrFee = totalFees - revenueFee const protocolFee = revenueFee - const buybackFee = 0 return { timestamp, diff --git a/helpers/customBackfill.ts b/helpers/customBackfill.ts index 2dd9436465..74ba31f2bf 100644 --- a/helpers/customBackfill.ts +++ b/helpers/customBackfill.ts @@ -21,8 +21,8 @@ export default (chain: Chain, graphs: IGraphs): Fetch => async (timestamp: numbe Object.keys(resultPreviousDayN).filter((key) => key.includes('total')).forEach(key => { const dimension = `daily${key.slice(5)}` if (resultDayN[dimension] === undefined) { - const dataResultDayN = resultDayN[key] - const dataResultPreviousDayN = resultPreviousDayN[key] + const dataResultDayN = resultDayN[key] as any + const dataResultPreviousDayN = resultPreviousDayN[key] as any if (dataResultPreviousDayN !== undefined && dataResultDayN !== undefined) { if (typeof dataResultDayN === 'object' && typeof dataResultPreviousDayN === 'object') { response[dimension] = Object.keys(dataResultDayN).reduce((acc, key) => { diff --git a/helpers/getUniSubgraphFees.ts b/helpers/getUniSubgraphFees.ts index 776da2c0d4..16a9ba5f9a 100644 --- a/helpers/getUniSubgraphFees.ts +++ b/helpers/getUniSubgraphFees.ts @@ -99,8 +99,8 @@ const getDexChainBreakdownFees = ({ volumeAdapter, totalFees = 0, protocolFees = const baseAdapters = Object.keys(volAdapter).map(chain => { const fetchFees = async (timestamp: number, chainBlocks: ChainBlocks) => { const fetchedResult: FetchResultVolume = await volAdapter[chain].fetch(timestamp, chainBlocks) - const chainDailyVolume = fetchedResult.dailyVolume ? fetchedResult.dailyVolume : "0"; - const chainTotalVolume = fetchedResult.totalVolume ? fetchedResult.totalVolume : "0"; + const chainDailyVolume = fetchedResult.dailyVolume ? fetchedResult.dailyVolume as number : "0"; + const chainTotalVolume = fetchedResult.totalVolume ? fetchedResult.totalVolume as number : "0"; return { timestamp, @@ -140,8 +140,8 @@ const getDexChainFees = ({ volumeAdapter, totalFees = 0, protocolFees = 0, ...pa Object.keys(adapterObj).map(chain => { const fetchFees = async (timestamp: number, chainBlocks: ChainBlocks) => { const fetchedResult: FetchResultVolume = await adapterObj[chain].fetch(timestamp, chainBlocks) - const chainDailyVolume = fetchedResult.dailyVolume; - const chainTotalVolume = fetchedResult.totalVolume; + const chainDailyVolume = fetchedResult.dailyVolume as number; + const chainTotalVolume = fetchedResult.totalVolume as number; const response: FetchResultGeneric = { timestamp } if (chainDailyVolume !== undefined) { if (totalFees)