Skip to content

Commit

Permalink
fix: backup if data is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
nick134-bit committed May 2, 2024
1 parent fa9533f commit fa73c21
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/Pages/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ export const Dashboard: FC = () => {
const circulatingWhaleSupply = dashboardData.supply?.circulating / (10 ** 6) || 0
const marketCap = circulatingWhaleSupply * (prices?.WHALE || 0) || 0
const mappedDashboardData = dashboardData.dashboardData?.map((data) => {
const apr = dashboardData.bondingInfos[data.chainName]?.bondingAPR
const buyback = dashboardData.bondingInfos[data.chainName]?.buyback

const apr = (dashboardData?.bondingInfos?.[data?.chainName]?.bondingAPR) || 0;
const buyback = (dashboardData?.bondingInfos?.[data?.chainName]?.buyback) || 0;

return ({
logoUrl: getChainLogoUrlByName(data.chainName),
chainName: data.chainName,
Expand Down

0 comments on commit fa73c21

Please sign in to comment.