diff --git a/app/rpcApi.js b/app/rpcApi.js index 569ab8a..7bd3661 100644 --- a/app/rpcApi.js +++ b/app/rpcApi.js @@ -325,21 +325,23 @@ function getRawTransactions(txids) { return; } - if (txids.length == 1 && txids[0] == coins[env.coin].genesisCoinbaseTransactionId) { - // copy the "confirmations" field from genesis block to the genesis-coinbase tx - getBlockByHeight(0).then(function(blockZeroResult) { - var result = coins[env.coin].genesisCoinbaseTransaction; - result.confirmations = blockZeroResult.getblock.confirmations; + if (coins[env.coin].genesisCoinbaseTransactionId) { + if (txids.length == 1 && txids[0] == coins[env.coin].genesisCoinbaseTransactionId) { + // copy the "confirmations" field from genesis block to the genesis-coinbase tx + getBlockByHeight(0).then(function(blockZeroResult) { + var result = coins[env.coin].genesisCoinbaseTransaction; + result.confirmations = blockZeroResult.getblock.confirmations; - resolve([result]); + resolve([result]); - }).catch(function(err) { - reject(err); + }).catch(function(err) { + reject(err); - return; - }); + return; + }); - return; + return; + } } var requests = []; @@ -387,7 +389,7 @@ function executeBatchesSequentiallyInternal(batchId, batches, currentIndex, accu results.forEach((item) => { accumulatedResults.push(item); - count--; + count--; }); if (count == 0) { diff --git a/app/utils.js b/app/utils.js index 16b7676..62a5b11 100644 --- a/app/utils.js +++ b/app/utils.js @@ -150,5 +150,6 @@ module.exports = { getRandomString: getRandomString, formatBytes: formatBytes, formatCurrencyAmount: formatCurrencyAmount, - formatExchangedCurrency: formatExchangedCurrency + formatExchangedCurrency: formatExchangedCurrency, + addThousandsSeparators: addThousandsSeparators }; diff --git a/views/node-details.pug b/views/node-details.pug index 79cab1a..9b6ce1b 100644 --- a/views/node-details.pug +++ b/views/node-details.pug @@ -21,6 +21,10 @@ block content if (true) table(class="table") + tr + th(class="table-active properties-header") Host : Port + td(class="monospace") #{env.rpc.host + " : " + env.rpc.port} + tr th(class="table-active properties-header") Chain td(class="monospace") #{getblockchaininfo.chain} diff --git a/views/transaction.pug b/views/transaction.pug index 422906a..f2239ca 100644 --- a/views/transaction.pug +++ b/views/transaction.pug @@ -125,7 +125,7 @@ block content span(class="text-muted") (#{utils.formatCurrencyAmount(totalInputValue, currencyFormatType)} - #{utils.formatCurrencyAmount(totalOutputValue, currencyFormatType)}) br - span ~#{new DecimalRounded(totalInputValue).minus(totalOutputValue).dividedBy(result.getrawtransaction.size).times(100000000)} sat/B + span ~#{utils.addThousandsSeparators(new DecimalRounded(totalInputValue).minus(totalOutputValue).dividedBy(result.getrawtransaction.size).times(100000000))} sat/B if (result.getrawtransaction.vin[0].coinbase) div(class="card mb-3")