From 636024a73ad52102a537b091d53c1034a8164368 Mon Sep 17 00:00:00 2001 From: degencreator Date: Tue, 1 Oct 2024 11:18:05 +0200 Subject: [PATCH] fix: Dexs subgraph for intentx --- dexs/intent-x/index.tsx | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/dexs/intent-x/index.tsx b/dexs/intent-x/index.tsx index 7dfe3ea32c..85857769ca 100644 --- a/dexs/intent-x/index.tsx +++ b/dexs/intent-x/index.tsx @@ -9,11 +9,11 @@ const ONE_DAY_IN_SECONDS = 60 * 60 * 24; const endpoint_0_8_0 = "https://api.studio.thegraph.com/query/62472/perpetuals-analytics_base/version/latest"; const endpoint = - "https://api.goldsky.com/api/public/project_cm0bho0j0ji6001t8e26s0wv8/subgraphs/intentx-base-analytics-082/latest/gn"; + "https://api.goldsky.com/api/public/project_cm0bho0j0ji6001t8e26s0wv8/subgraphs/intentx-base-analytics-083/latest/gn"; const endpoint_blast = "https://api.goldsky.com/api/public/project_cm0bho0j0ji6001t8e26s0wv8/subgraphs/intentx-blast-analytics-083/latest/gn"; const endpoint_mantle = - "https://subgraph-api.mantle.xyz/subgraphs/name/mantle_intentx-analytics_082"; + "https://api.goldsky.com/api/public/project_cm0bho0j0ji6001t8e26s0wv8/subgraphs/intentx-mantle-analytics-083/latest/gn"; const query_0_8_0 = gql` query stats($from: String!, $to: String!) { @@ -171,8 +171,12 @@ const fetchVolume = async (timestamp: number): Promise => { totalTakerVolume = totalTakerVolume.plus(new BigNumber(data.tradeVolume)); }); - const dailyVolume = dailyMakerVolume.plus(dailyTakerVolume).dividedBy(new BigNumber(1e18)); - const totalVolume = totalMakerVolume.plus(totalTakerVolume).dividedBy(new BigNumber(1e18)); + const dailyVolume = dailyMakerVolume + .plus(dailyTakerVolume) + .dividedBy(new BigNumber(1e18)); + const totalVolume = totalMakerVolume + .plus(totalTakerVolume) + .dividedBy(new BigNumber(1e18)); const _dailyVolume = toString(dailyVolume); const _totalVolume = toString(totalVolume); @@ -211,8 +215,12 @@ const fetchVolumeBlast = async ( totalTakerVolume = totalTakerVolume.plus(new BigNumber(data.tradeVolume)); }); - const dailyVolume = dailyMakerVolume.plus(dailyTakerVolume).dividedBy(new BigNumber(1e18)); - const totalVolume = totalMakerVolume.plus(totalTakerVolume).dividedBy(new BigNumber(1e18)); + const dailyVolume = dailyMakerVolume + .plus(dailyTakerVolume) + .dividedBy(new BigNumber(1e18)); + const totalVolume = totalMakerVolume + .plus(totalTakerVolume) + .dividedBy(new BigNumber(1e18)); const _dailyVolume = toString(dailyVolume); const _totalVolume = toString(totalVolume); @@ -251,8 +259,12 @@ const fetchVolumeMantle = async ( totalTakerVolume = totalTakerVolume.plus(new BigNumber(data.tradeVolume)); }); - const dailyVolume = dailyMakerVolume.plus(dailyTakerVolume).dividedBy(new BigNumber(1e18)); - const totalVolume = totalMakerVolume.plus(totalTakerVolume).dividedBy(new BigNumber(1e18)); + const dailyVolume = dailyMakerVolume + .plus(dailyTakerVolume) + .dividedBy(new BigNumber(1e18)); + const totalVolume = totalMakerVolume + .plus(totalTakerVolume) + .dividedBy(new BigNumber(1e18)); const _dailyVolume = toString(dailyVolume); const _totalVolume = toString(totalVolume);