Skip to content

Commit

Permalink
use growth data as backup(if available) in case api fails
Browse files Browse the repository at this point in the history
  • Loading branch information
radumojic committed Dec 13, 2024
1 parent b0d21b6 commit f52214b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/widgets/BlockHeightStatsCard/BlockHeightStatsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export const BlockHeightStatsCard = () => {
? bNBlocks.toFormat(0)
: undefined;
const displayGrowthHeight =
blockHeight && !isNaN(Number(blockHeight)) ? blockHeight : undefined;
blockHeight && !isNaN(Number(blockHeight)) && Number(blockHeight) > 0
? blockHeight
: undefined;

const displayValue = displayStatsHeight || displayGrowthHeight || ELLIPSIS;

Expand Down

0 comments on commit f52214b

Please sign in to comment.