Browse Source

fix template errors for unconfirmed transactions

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

13
views/transaction.pug

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

Loading…
Cancel
Save