Skip to content

Commit

Permalink
fix params
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Jul 28, 2023
1 parent 7567a7c commit 1e5caea
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/hooks/useBasicChartData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -91,14 +91,14 @@ const fetchCoingeckoDataSWR = async ([tokenAddresses, chainIds, timeFrame, coing
]): Promise<any> => {
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
}),
),
)
}
Expand Down

0 comments on commit 1e5caea

Please sign in to comment.