Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chain length to the details view for an unconfirmed transaction #7

Merged
merged 2 commits into from
Feb 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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