From 1e5caea0683e0467e186ec3b04e2b7a638ec9fde Mon Sep 17 00:00:00 2001 From: Danh Date: Fri, 28 Jul 2023 21:06:25 +0700 Subject: [PATCH] fix params --- src/hooks/useBasicChartData.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/hooks/useBasicChartData.ts b/src/hooks/useBasicChartData.ts index b9f0b4e0aa..a67865cd6c 100644 --- a/src/hooks/useBasicChartData.ts +++ b/src/hooks/useBasicChartData.ts @@ -70,7 +70,7 @@ const fetchKyberDataSWR = async (url: string) => { } const fetchKyberDataSWRWithHeader = async (url: string) => { - const res = await KyberOauth2Api.get(url, { + const res = await KyberOauth2Api.get(url, undefined, { timeout: 5000, headers: { 'accept-version': 'Latest', @@ -91,14 +91,14 @@ const fetchCoingeckoDataSWR = async ([tokenAddresses, chainIds, timeFrame, coing ]): Promise => { return await Promise.all( [tokenAddresses[0], tokenAddresses[1]].map((address, i) => - KyberOauth2Api.get(generateCoingeckoUrl(coingeckoAPI, chainIds[i], address, timeFrame), { timeout: 5000 }).then( - res => { - if (res.status === 204) { - throw new Error('No content') - } - return res.data - }, - ), + KyberOauth2Api.get(generateCoingeckoUrl(coingeckoAPI, chainIds[i], address, timeFrame), undefined, { + timeout: 5000, + }).then(res => { + if (res.status === 204) { + throw new Error('No content') + } + return res.data + }), ), ) }