From 6823995510a3226679d990526288ee670897a347 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Sun, 5 Jul 2020 00:06:50 -0700 Subject: [PATCH] adding debug, accounting for mined/cb txes --- src/main.rs | 3 ++- static/css/main.css | 3 +++ templates/transaction.html.tera | 10 ++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3fe9cf8..fcff56a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -96,7 +96,8 @@ fn get_transaction_by_hash(tx_hash: String) -> Template { let context = json!({ "tx_info": res.txs, - "tx_hash": tx_hash + "tx_hash": tx_hash, + "debug": res.clone() }); Template::render("transaction", context) } diff --git a/static/css/main.css b/static/css/main.css index 37273cf..2ffbab0 100755 --- a/static/css/main.css +++ b/static/css/main.css @@ -322,3 +322,6 @@ p.subheader { margin: 0; padding-bottom: 0; } +.debug { + word-wrap: break-word; +} diff --git a/templates/transaction.html.tera b/templates/transaction.html.tera index e3e8ed4..b79752a 100644 --- a/templates/transaction.html.tera +++ b/templates/transaction.html.tera @@ -32,7 +32,7 @@

Transaction Fee

-

{{ tx_info.0.as_json_full.rct_signatures.txnFee / 1000000000000 | default(value="?") }} WOW

+

{% if tx_info.0.as_json_full.rct_signatures.txnFee / 1000000000000 %}{{ tx_info.0.as_json_full.rct_signatures.txnFee }} WOW{% else %}0 (mined){% endif %}

@@ -80,7 +80,7 @@ {% for i in tx_info.0.as_json_full.vin %} - {{ i.key.k_image | default(value="?") }} + {{ i.key.k_image | default(value="none (mined)") }} {% endfor %} {% endif %} @@ -101,6 +101,12 @@ {% endif %}
+
+ + +

Debug Output

+

{{ debug | json_encode() }}

+