Browse Source

minor tweaks

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
a4773badb8
  1. 2
      app/rpcApi.js
  2. 3
      app/utils.js
  3. 4
      views/node-details.pug
  4. 2
      views/transaction.pug

2
app/rpcApi.js

@ -325,6 +325,7 @@ function getRawTransactions(txids) {
return; return;
} }
if (coins[env.coin].genesisCoinbaseTransactionId) {
if (txids.length == 1 && txids[0] == 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 // copy the "confirmations" field from genesis block to the genesis-coinbase tx
getBlockByHeight(0).then(function(blockZeroResult) { getBlockByHeight(0).then(function(blockZeroResult) {
@ -341,6 +342,7 @@ function getRawTransactions(txids) {
return; return;
} }
}
var requests = []; var requests = [];
for (var i = 0; i < txids.length; i++) { for (var i = 0; i < txids.length; i++) {

3
app/utils.js

@ -150,5 +150,6 @@ module.exports = {
getRandomString: getRandomString, getRandomString: getRandomString,
formatBytes: formatBytes, formatBytes: formatBytes,
formatCurrencyAmount: formatCurrencyAmount, formatCurrencyAmount: formatCurrencyAmount,
formatExchangedCurrency: formatExchangedCurrency formatExchangedCurrency: formatExchangedCurrency,
addThousandsSeparators: addThousandsSeparators
}; };

4
views/node-details.pug

@ -21,6 +21,10 @@ block content
if (true) if (true)
table(class="table") table(class="table")
tr
th(class="table-active properties-header") Host : Port
td(class="monospace") #{env.rpc.host + " : " + env.rpc.port}
tr tr
th(class="table-active properties-header") Chain th(class="table-active properties-header") Chain
td(class="monospace") #{getblockchaininfo.chain} td(class="monospace") #{getblockchaininfo.chain}

2
views/transaction.pug

@ -125,7 +125,7 @@ block content
span(class="text-muted") (#{utils.formatCurrencyAmount(totalInputValue, currencyFormatType)} - #{utils.formatCurrencyAmount(totalOutputValue, currencyFormatType)}) span(class="text-muted") (#{utils.formatCurrencyAmount(totalInputValue, currencyFormatType)} - #{utils.formatCurrencyAmount(totalOutputValue, currencyFormatType)})
br 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) if (result.getrawtransaction.vin[0].coinbase)
div(class="card mb-3") div(class="card mb-3")

Loading…
Cancel
Save