Skip to content
Permalink
Browse files
add supply, reward & marketcap to fp
  • Loading branch information
proteanx committed Mar 7, 2020
1 parent 938f524 commit c3a12ab10f94ebca0c6258f239300a9e974c975f
Showing with 50 additions and 26 deletions.
  1. +50 −26 views/index.pug
@@ -89,6 +89,34 @@ block content
span #{hashrateData[0]}
span.border-dotted(title=`${hashrateData[1].abbreviation}H = ${hashrateData[1].name}-hash (x10^${hashrateData[1].exponent})`, data-toggle="tooltip") #{hashrateData[1].abbreviation}H/s

div(class=networkSummaryColumnClass)
div(class="float-left", style="height: 40px; width: 40px; font-size: 12px;")
span
i(class="fas fa-dumbbell fa-2x mr-2", style="margin-top: 6px;")

- var difficultyData = utils.formatLargeNumber(getblockchaininfo.difficulty, 3);

span(class="font-weight-bold") Difficulty

p(class="lead")
span.mr-2.border-dotted(data-toggle="tooltip", title=parseFloat(getblockchaininfo.difficulty).toLocaleString())
span #{difficultyData[0]} #{difficultyData[1].abbreviation}

div(class=networkSummaryColumnClass)
div(class="float-left", style="height: 40px; width: 40px;")
span
i(class="fas fa-bolt fa-2x mr-2", style="margin-top: 6px; margin-left: 6px;")

- var chainworkData = utils.formatLargeNumber(parseInt("0x" + getblockchaininfo.chainwork), 2);
span(class="font-weight-bold") Chainwork

p(class="lead")
span.mr-2.border-dotted(data-toggle="tooltip", title=getblockchaininfo.chainwork.replace(/^0+/, ''))
span #{chainworkData[0]}
span x 10
sup #{chainworkData[1].exponent}
span hashes

if (txStats)
div(class=networkSummaryColumnClass)
div(class="float-left", style="height: 40px; width: 40px;")
@@ -110,35 +138,24 @@ block content
- var mempoolBytesData = utils.formatLargeNumber(mempoolInfo.usage, 2);
small(class="text-muted font-weight-light") (#{mempoolBytesData[0]} #{mempoolBytesData[1].abbreviation}B)

div(class=networkSummaryColumnClass)
div(class="float-left", style="height: 40px; width: 40px;")
span
i(class="fas fa-bolt fa-2x mr-2", style="margin-top: 6px; margin-left: 6px;")

- var chainworkData = utils.formatLargeNumber(parseInt("0x" + getblockchaininfo.chainwork), 2);
span(class="font-weight-bold") Chainwork

p(class="lead")
span.mr-2.border-dotted(data-toggle="tooltip", title=getblockchaininfo.chainwork.replace(/^0+/, ''))
span #{chainworkData[0]}
span x 10
sup #{chainworkData[1].exponent}
span hashes

div(class=networkSummaryColumnClass)
div(class="float-left", style="height: 40px; width: 40px; font-size: 12px;")
span
i(class="fas fa-dumbbell fa-2x mr-2", style="margin-top: 6px;")
i(class="fas fa-coins fa-2x mr-2", style="margin-top: 7px;")

- var difficultyData = utils.formatLargeNumber(getblockchaininfo.difficulty, 3);
span(class="font-weight-bold") Current Reward

span(class="font-weight-bold") Difficulty
- var cbrewardData = coinConfig.blockRewardFunction(getblockchaininfo.blocks, global.activeBlockchain);
p(class="lead") #{cbrewardData.toLocaleString()} DVT

p(class="lead")
span.mr-2.border-dotted(data-toggle="tooltip", title=parseFloat(getblockchaininfo.difficulty).toLocaleString())
span #{difficultyData[0]}
span x 10
sup #{difficultyData[1].exponent}
if (getblockchaininfo.coinsupply)
div(class=networkSummaryColumnClass)
div(class="float-left", style="height: 40px; width: 40px;")
span
i(class="fas fa-database fa-2x mr-2", style="margin-top: 6px; margin-left: 3px;")
span(class="font-weight-bold") Coin Supply

p(class="lead") #{getblockchaininfo.coinsupply.toLocaleString()} DVT

if (getblockchaininfo.size_on_disk)
div(class=networkSummaryColumnClass)
@@ -158,12 +175,19 @@ block content

span.font-weight-bold.border-dotted(data-toggle="tooltip", title=("Exchange-rate data from: " + coinConfig.exchangeRateData.jsonUrl)) Exchange Rate

if (global.exchangeRates)
p(class="lead") #{utils.formatValueInActiveCurrency(1.0)}
small.text-muted.font-weight-light (#{utils.satoshisPerUnitOfActiveCurrency()})

else
p(class="lead") -
if (global.exchangeRates)
div(class=networkSummaryColumnClass)
div(class="float-left", style="height: 40px; width: 40px; font-size: 12px;")
span
i(class="fas fa-coins fa-2x mr-2", style="margin-top: 7px;")

span.font-weight-bold.border-dotted(data-toggle="tooltip", title=("Exchange-rate data from: " + coinConfig.exchangeRateData.jsonUrl)) Marketcap

- var marketcapData = utils.formatValueInActiveCurrency2(getblockchaininfo.coinsupply);
p(class="lead") #{marketcapData.toLocaleString()}


include includes/tools-card.pug

0 comments on commit c3a12ab

Please sign in to comment.