From f3a0ef97c2d388547d4343d0add3b3e4cab13652 Mon Sep 17 00:00:00 2001 From: PabloWong <47540797+PabloWong@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:05:15 -0400 Subject: [PATCH] Update index-network-summary.pug bug preventing from be runned in regtest --- views/includes/index-network-summary.pug | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/views/includes/index-network-summary.pug b/views/includes/index-network-summary.pug index 20c807d6c..8e7c37ddb 100644 --- a/views/includes/index-network-summary.pug +++ b/views/includes/index-network-summary.pug @@ -10,6 +10,10 @@ if (exchangeRates || networkVolume) - let halvingProgressPercent = 0; if (nextHalvingData) + if (!nextHalvingData.blocksUntilNextHalving) + - nextHalvingData.blocksUntilNextHalving = 0; + - nextHalvingData.halvingBlockInterval = 0; + - halvingProgressPercent = new Decimal(100).minus(new Decimal(nextHalvingData.blocksUntilNextHalving).dividedBy(nextHalvingData.halvingBlockInterval).times(100)); if (halvingProgressPercent > 65)