From 528db7bc818a1895192efa205e10427c0bb05e8c Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Fri, 28 Jul 2017 11:58:58 -0400 Subject: [PATCH] more improvements to tx page for unconfirmed tx --- views/transaction.pug | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/views/transaction.pug b/views/transaction.pug index 88ecb00..03693e4 100644 --- a/views/transaction.pug +++ b/views/transaction.pug @@ -62,13 +62,21 @@ block content tr th(class="table-active properties-header") Included in Block td - a(href=("/block/" + result.getrawtransaction.blockhash)) #{result.getrawtransaction.blockhash} - if (result.getblock && result.getblock.height) - span(class="text-muted") (#{result.getblock.height}) + if (result.getblock) + a(href=("/block/" + result.getrawtransaction.blockhash)) #{result.getrawtransaction.blockhash} + if (result.getblock.height) + span(class="text-muted") (#{result.getblock.height}) + else + span N/A + span(class="text-muted") (unconfirmed) tr th(class="table-active properties-header") Timestamp - td #{moment.utc(new Date(result.getrawtransaction["time"] * 1000)).format("Y-MM-DD HH:mm:ss")} (utc) + if (result.getrawtransaction.time) + td #{moment.utc(new Date(result.getrawtransaction["time"] * 1000)).format("Y-MM-DD HH:mm:ss")} (utc) + else + td N/A + span(class="text-muted") (unconfirmed) //tr // th(class="table-active properties-header") Transaction ID