Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
homepage: live halving countdown section when very close (98%+)
- Loading branch information
Showing
6 changed files
with
149 additions
and
10 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
include ../includes/shared-mixins.pug | ||
|
||
if (nextHalvingData.nextHalvingIndex > -1) | ||
+summaryRow(5) | ||
+summaryItem("Blocks Remaining") | ||
| #{nextHalvingData.blocksUntilNextHalving.toLocaleString()} | ||
|
||
+summaryItem("Time Remaining", "The estimated time until halving, based on the number of blocks remaining and the current mining rate (up until the next difficulty adjustment).") | ||
+timeAgo(nextHalvingData.nextHalvingDate.getTime() / 1000, {showPlus:false}) | ||
|
||
+summaryItem("Estimated Date", "The date of halving, estimated based on the number of blocks remaining and the current mining rate (up until the next difficulty adjustment).") | ||
+timestamp(nextHalvingData.nextHalvingDate.getTime() / 1000, {includeAgo:false}) | ||
|
||
+summaryItem("Block Height", "The block height at which the new block subsidy will begin.") | ||
| #{nextHalvingData.nextHalvingBlock.toLocaleString()} | ||
|
||
+summaryItem("New Subsidy", "The new supply that will be created (and rewarded to the winning miner) for each new block during the next halving's era.") | ||
- let subsidy = coinConfig.blockRewardFunction(nextHalvingData.nextHalvingBlock, global.activeBlockchain); | ||
+valueDisplay(subsidy) | ||
|
||
- let progressPercent = new Decimal(nextHalvingData.halvingBlockInterval).minus(nextHalvingData.blocksUntilNextHalving).dividedBy(nextHalvingData.halvingBlockInterval).times(100); | ||
.progress.mt-5(role="progressbar", aria-label="Next halving progress", aria-valuenow=progressPercent.toDP(0), aria-valuemin="0", aria-valuemax="100") | ||
.progress-bar(style=`width: ${progressPercent.toDP(0)}%`) | ||
| #{progressPercent.toDP(4)}% | ||
|
||
|