Skip to content

Commit

Permalink
Add chain length to the details view for an unconfirmed transaction (#7)
Browse files Browse the repository at this point in the history
* Add chain length to the details view for unconfirmed transactions
* Add a missing space char in "Locktime" field description
  • Loading branch information
sickpig committed Feb 4, 2020
1 parent 549e5ff commit 700395f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions views/transaction.pug
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ block content
div(class="summary-table-label") Status
div(class="summary-table-content monospace")
span(class="text-warning") Unconfirmed
div(class="summary-table-label") Chain Lenght
div(class="summary-table-content monospace")
span #{mempoolDetails.ancestors.length + mempoolDetails.descendants.length + 1}

if (isTxConfirmed)
div(class="row")
Expand Down Expand Up @@ -110,7 +113,8 @@ block content
div(class="summary-table-label") Locktime
div(class="summary-table-content monospace")
if (result.getrawtransaction.locktime < 500000000)
span Spendable in block
// the following is not a traling space
span Spendable in block
a(href=("/block-height/" + result.getrawtransaction.locktime)) #{result.getrawtransaction.locktime.toLocaleString()}
span or later
a(href="https://bitcoin.org/en/developer-guide#locktime-and-sequence-number", data-toggle="tooltip", title="More info about locktime", target="_blank")
Expand Down Expand Up @@ -230,7 +234,9 @@ block content
div(class="card mb-3 shadow-sm")
div(class="card-header")
h2(class="h6 mb-0")
span #{mempoolDetails.ancestors.length.toLocaleString()}
// the below is not trailing spaces, it is actually needed
span #{mempoolDetails.ancestors.length.toLocaleString()}

if (mempoolDetails.ancestors.length == 1)
span Ancestor
else
Expand All @@ -247,7 +253,8 @@ block content
div(class="card mb-3 shadow-sm")
div(class="card-header")
h2(class="h6 mb-0")
span #{mempoolDetails.descendants.length.toLocaleString()}
// the below is not trailing spaces, it is actually needed
span #{mempoolDetails.descendants.length.toLocaleString()}
if (mempoolDetails.descendants.length == 1)
span Descendant
else
Expand Down

0 comments on commit 700395f

Please sign in to comment.