Compare commits

...

3 Commits

@ -96,7 +96,8 @@ fn get_transaction_by_hash(tx_hash: String) -> Template {
let context = json!({ let context = json!({
"tx_info": res.txs, "tx_info": res.txs,
"tx_hash": tx_hash "tx_hash": tx_hash,
"debug": res.clone()
}); });
Template::render("transaction", context) Template::render("transaction", context)
} }

@ -322,3 +322,6 @@ p.subheader {
margin: 0; margin: 0;
padding-bottom: 0; padding-bottom: 0;
} }
.debug {
word-wrap: break-word;
}

@ -19,7 +19,7 @@
<ul class="links"> <ul class="links">
<li><a href="https://html5up.net" target=_blank>Design by HTML5 UP</a></li> <li><a href="https://html5up.net" target=_blank>Design by HTML5 UP</a></li>
<li><a href="https://git.wownero.com/lza_menace/wownero-explorer" target=_blank>View the code</a></li> <li><a href="https://git.wownero.com/lza_menace/wownero-explorer" target=_blank>View the code</a></li>
<li><a href="https://wownero.com/" target=_blank>Learn about WOW</a></li> <li><a href="https://wownero.org/" target=_blank>Learn about WOW</a></li>
<li><a href="https://twitter.com/lza_menace" target=_blank>Holler at me dog</a></li> <li><a href="https://twitter.com/lza_menace" target=_blank>Holler at me dog</a></li>
</ul> </ul>
</div> </div>

@ -32,7 +32,7 @@
<header> <header>
<h3>Transaction Fee</h3> <h3>Transaction Fee</h3>
</header> </header>
<p>{{ tx_info.0.as_json_full.rct_signatures.txnFee / 1000000000000 | default(value="?") }} WOW</p> <p>{% if tx_info.0.as_json_full.rct_signatures.txnFee %}{{ tx_info.0.as_json_full.rct_signatures.txnFee / 1000000000000 }} WOW{% else %}0 (mined){% endif %}</p>
</section> </section>
</div> </div>
<div class="col-4 col-6-medium col-12-small"> <div class="col-4 col-6-medium col-12-small">
@ -80,7 +80,7 @@
</tr> </tr>
{% for i in tx_info.0.as_json_full.vin %} {% for i in tx_info.0.as_json_full.vin %}
<tr> <tr>
<td>{{ i.key.k_image | default(value="?") }}</td> <td>{{ i.key.k_image | default(value="none (mined)") }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
@ -101,6 +101,12 @@
{% endif %} {% endif %}
</table> </table>
</div> </div>
<div class="debug">
<table>
<caption><h2>Debug Output</h2></caption>
</table>
<p>{{ debug | json_encode() }}</p>
</div>
</div> </div>
</section> </section>