diff --git a/components/Pages/Dashboard/Dashboard.tsx b/components/Pages/Dashboard/Dashboard.tsx index 6a7fef46..939ced96 100644 --- a/components/Pages/Dashboard/Dashboard.tsx +++ b/components/Pages/Dashboard/Dashboard.tsx @@ -35,8 +35,8 @@ export const Dashboard: FC = () => { const mappedDashboardData = [] dashboardData.dashboardData?.map((data) => { - const apr = (dashboardData?.bondingInfos?.[data.chainName]?.bondingAPR) || 0; - const buyback = (dashboardData?.bondingInfos?.[data.chainName]?.buyback) || 0; + const apr = (dashboardData?.bondingInfos?.[data.chainName]?.bondingAPR); + const buyback = (dashboardData?.bondingInfos?.[data.chainName]?.buyback); const chain = chains?.find((chain) => WALLET_CHAIN_NAMES_BY_CHAIN_ID[chain.chainId] === data.chainName) if (!chain) { diff --git a/services/useAPI.ts b/services/useAPI.ts index d904b76b..7bf47f39 100644 --- a/services/useAPI.ts +++ b/services/useAPI.ts @@ -162,14 +162,10 @@ export const getPairAprAndDailyVolumeAPI = async (chain_name: string) => { } export const getBondingAPRsAPI = async () => { - try { const response = await fetchWithTimeout(`${await getFastestAPI()}/apex/bonding/aprs`, 50000) const json = await response.json() - return json?.data || null - } catch (error) { - console.error(error) - return null - } + return json?.data + } export async function fetchWithTimeout(url: string, timoutMS = 10000) {