diff --git a/src/pages/StatisticsChart/mining/DifficultyUncleRateEpoch.tsx b/src/pages/StatisticsChart/mining/DifficultyUncleRateEpoch.tsx index bd7be7eab..7229f9b0e 100644 --- a/src/pages/StatisticsChart/mining/DifficultyUncleRateEpoch.tsx +++ b/src/pages/StatisticsChart/mining/DifficultyUncleRateEpoch.tsx @@ -1,7 +1,7 @@ import { FC } from 'react' import BigNumber from 'bignumber.js' import { useTranslation } from 'react-i18next' -import { assertSerialsDataIsString, assertIsArray, assertSerialsItem, handleAxis } from '../../../utils/chart' +import { assertIsArray, assertSerialsItem, handleAxis } from '../../../utils/chart' import { tooltipColor, tooltipWidth, SeriesItem, SmartChartPage } from '../common' import { parseHourFromMillisecond } from '../../../utils/date' import { ChartItem, explorerService } from '../../../services/ExplorerService' @@ -14,11 +14,13 @@ const widthSpan = (value: string, currentLanguage: SupportedLng) => const useTooltip = () => { const { t } = useTranslation() const currentLanguage = useCurrentLanguage() - return ({ seriesName, data, color }: SeriesItem & { data: string }) => { - if (seriesName === t('block.epoch_time')) { + return ({ seriesName, data, color }: SeriesItem & { data?: unknown }) => { + // empty epoch time is invalid and could be hidden, epoch time is expected to be around 4 hours + if (seriesName === t('block.epoch_time') && data) { return `