Skip to content

Commit

Permalink
fix: backup if data is missing (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
nick134-bit authored May 2, 2024
1 parent fa9533f commit a223a84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion components/Pages/Bonding/hooks/getCurrentEpoch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const getCurrentEpoch = async (client: CosmWasmClient,
if (!client || !config?.fee_distributor) {
return null
}
console.log(config, client)
const currentEpoch = await fetchCurrentEpoch(client, config)

return { currentEpoch }
Expand Down
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 a223a84

Please sign in to comment.