Browse Source

tweaks / fixes for unconfirmed tx

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
3fd1c3cb31
  1. 23
      views/transaction.pug

23
views/transaction.pug

@ -69,6 +69,17 @@ block content
span(class="h6") Summary span(class="h6") Summary
div(class="card-body") div(class="card-body")
table(class="table details-table mb-0") table(class="table details-table mb-0")
- var isTxConfirmed = true;
if (!result.getrawtransaction.confirmations || result.getrawtransaction.confirmations == 0)
- isTxConfirmed = false;
if (!isTxConfirmed)
tr
td(class="properties-header") Status
td(class="monospace text-danger") Unconfirmed
if (isTxConfirmed)
tr tr
td(class="properties-header") Included in Block td(class="properties-header") Included in Block
td(class="monospace word-wrap") td(class="monospace word-wrap")
@ -81,6 +92,7 @@ block content
span N/A span N/A
span(class="text-muted") (unconfirmed) span(class="text-muted") (unconfirmed)
if (isTxConfirmed)
tr tr
td(class="properties-header") Timestamp td(class="properties-header") Timestamp
@ -93,10 +105,6 @@ block content
td(class="monospace") N/A td(class="monospace") N/A
span(class="text-muted") (unconfirmed) span(class="text-muted") (unconfirmed)
//tr
// th(class="table-active properties-header") Transaction ID
// td #{txid}
tr tr
td(class="properties-header") Version td(class="properties-header") Version
td(class="monospace") #{result.getrawtransaction.version} td(class="monospace") #{result.getrawtransaction.version}
@ -125,13 +133,16 @@ block content
a(href="https://bitcoin.org/en/developer-guide#locktime-and-sequence-number", data-toggle="tooltip", title="More info about locktime", target="_blank") a(href="https://bitcoin.org/en/developer-guide#locktime-and-sequence-number", data-toggle="tooltip", title="More info about locktime", target="_blank")
i(class="fas fa-info-circle") i(class="fas fa-info-circle")
if (isTxConfirmed)
tr tr
td(class="properties-header") Confirmations td(class="properties-header") Confirmations
td(class="monospace") td(class="monospace")
if (!result.getrawtransaction.confirmations || result.getrawtransaction.confirmations == 0) if (!result.getrawtransaction.confirmations || result.getrawtransaction.confirmations == 0)
strong(class="text-danger") 0 (unconfirmed) strong(class="text-danger") 0 (unconfirmed)
else if (result.getrawtransaction.confirmations < 6) else if (result.getrawtransaction.confirmations < 6)
strong(class="text-warning") #{result.getrawtransaction.confirmations} strong(class="text-warning") #{result.getrawtransaction.confirmations}
else else
strong(class="text-success") #{result.getrawtransaction.confirmations.toLocaleString()} strong(class="text-success") #{result.getrawtransaction.confirmations.toLocaleString()}
@ -216,7 +227,9 @@ block content
div(class="card-body") div(class="card-body")
- var tx = result.getrawtransaction; - var tx = result.getrawtransaction;
- var txInputs = result.txInputs; - var txInputs = result.txInputs;
- var blockHeight = result.getblock.height; - var blockHeight = -1;
if (result && result.getblock)
- blockHeight = result.getblock.height;
include includes/transaction-io-details.pug include includes/transaction-io-details.pug
- var fontawesomeInputName = "sign-in-alt"; - var fontawesomeInputName = "sign-in-alt";

Loading…
Cancel
Save