From 92a509cd2f777f066752c4734ee0b6d09f69dbaf Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Wed, 5 Oct 2016 08:16:10 +0800 Subject: [PATCH] details of raw signed txs are shown using tx_details partial --- src/page.h | 7 +++--- src/templates/partials/tx_details.html | 31 +++++++++++++++----------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/page.h b/src/page.h index 981fcee..70bfffa 100644 --- a/src/page.h +++ b/src/page.h @@ -1286,6 +1286,7 @@ namespace xmreg { mstch::map context { {"testnet" , testnet}, {"unsigned_tx_given" , unsigned_tx_given}, + {"have_raw_tx" , true}, {"txs" , mstch::array{}} }; @@ -1474,11 +1475,9 @@ namespace xmreg { for (tools::wallet2::pending_tx& ptx: ptxs) { - tx_details txd = get_tx_details(ptx.tx); + mstch::map tx_context = construct_tx_context(ptx.tx); - mstch::map txd_map = txd.get_mstch_map(); - - boost::get(context["txs"]).push_back(txd_map); + boost::get(context["txs"]).push_back(tx_context); } } diff --git a/src/templates/partials/tx_details.html b/src/templates/partials/tx_details.html index 92d50f8..423255e 100644 --- a/src/templates/partials/tx_details.html +++ b/src/templates/partials/tx_details.html @@ -25,11 +25,13 @@ + {{^have_raw_tx}} + {{/have_raw_tx}} @@ -65,6 +67,7 @@
Timestamp: {{blk_timestamp_uint}} Timestamp [UCT]: {{blk_timestamp}} Age [y:d:h:m:s]: {{delta_time}}
Block: {{blk_height}} Fee: {{tx_fee}}
+ {{^have_raw_tx}}
@@ -100,8 +103,8 @@
- + {{/have_raw_tx}} @@ -175,20 +178,22 @@ - {{^with_ring_signatures}} -
More details
- {{/with_ring_signatures}} - {{#with_ring_signatures}} + {{^have_raw_tx}} + {{^with_ring_signatures}} +
More details
+ {{/with_ring_signatures}} + {{#with_ring_signatures}} -

JSON representaiton of tx

-
- - {{tx_json}} - -
+

JSON representation of tx

+
+ + {{tx_json}} + +
-
Less details
- {{/with_ring_signatures}} +
Less details
+ {{/with_ring_signatures}} + {{/have_raw_tx}}