From 700395f2ec1201c58eea2619ade4b202e6c134b5 Mon Sep 17 00:00:00 2001 From: Andrea Suisani Date: Tue, 4 Feb 2020 15:51:18 +0100 Subject: [PATCH] Add chain length to the details view for an unconfirmed transaction (#7) * Add chain length to the details view for unconfirmed transactions * Add a missing space char in "Locktime" field description --- views/transaction.pug | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/views/transaction.pug b/views/transaction.pug index f86c5f6e8..b45d2e61b 100644 --- a/views/transaction.pug +++ b/views/transaction.pug @@ -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") @@ -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") @@ -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 @@ -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