Browse Source

fix template errors for unconfirmed transactions

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
f5c0a9b125
  1. 15
      views/transaction.pug

15
views/transaction.pug

@ -14,8 +14,10 @@ block content
a(href="/")
strong #{host}
span :#{port}
li(class="breadcrumb-item")
a(href=("/block/" + result.getrawtransaction.blockhash)) Block #{result.getblock.height}
if (result.getrawtransaction.blockhash)
li(class="breadcrumb-item")
a(href=("/block/" + result.getrawtransaction.blockhash)) Block #{result.getblock.height}
li(class="breadcrumb-item active") Transaction
h1(class="h2") Transaction
@ -61,7 +63,8 @@ block content
th(class="table-active properties-header") Included in Block
td
a(href=("/block/" + result.getrawtransaction.blockhash)) #{result.getrawtransaction.blockhash}
span(class="text-muted") (#{result.getblock.height})
if (result.getblock && result.getblock.height)
span(class="text-muted") (#{result.getblock.height})
tr
th(class="table-active properties-header") Timestamp
@ -107,8 +110,8 @@ block content
tr
th(class="table-active properties-header") Confirmations
td
if (result.getrawtransaction.confirmations == 0)
strong(class="text-danger") #{result.getrawtransaction.confirmations} (Unconfirmed!)
if (!result.getrawtransaction.confirmations || result.getrawtransaction.confirmations == 0)
strong(class="text-danger") 0 (unconfirmed)
else if (result.getrawtransaction.confirmations < 6)
strong(class="text-warning") #{result.getrawtransaction.confirmations}
else
@ -268,4 +271,4 @@ block content
//pre #{JSON.stringify(result.txInputs, null, 4)}

Loading…
Cancel
Save