details of raw signed txs are shown using tx_details partial

This commit is contained in:
moneroexamples 2016-10-05 08:16:10 +08:00
parent ec314773f2
commit 92a509cd2f
2 changed files with 21 additions and 17 deletions

View File

@ -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<mstch::array>(context["txs"]).push_back(txd_map);
boost::get<mstch::array>(context["txs"]).push_back(tx_context);
}
}

View File

@ -25,11 +25,13 @@
<table class="center" style="width: 80%; margin-top:10px">
{{^have_raw_tx}}
<tr>
<td>Timestamp: {{blk_timestamp_uint}}</td>
<td>Timestamp [UCT]: {{blk_timestamp}}</td>
<td>Age [y:d:h:m:s]: {{delta_time}}</td>
</tr>
{{/have_raw_tx}}
<tr>
<td>Block: <a href="/block/{{blk_height}}">{{blk_height}}</a></td>
<td>Fee: {{tx_fee}}</td>
@ -65,6 +67,7 @@
</table>
</div>
{{^have_raw_tx}}
<div class="center" style="width:90%">
<div class="tabs">
@ -100,8 +103,8 @@
</div>
</div>
</div>
</div>
{{/have_raw_tx}}
@ -175,12 +178,13 @@
</table>
{{^have_raw_tx}}
{{^with_ring_signatures}}
<h5 style="margin-top:1px"><a href="/tx/{{tx_hash}}/1">More details</a></h5>
{{/with_ring_signatures}}
{{#with_ring_signatures}}
<h3>JSON representaiton of tx</h3>
<h3>JSON representation of tx</h3>
<div class="center">
<code style="white-space: pre-wrap; font-size: 10px">
{{tx_json}}
@ -189,6 +193,7 @@
<h5 style="margin-top:1px"><a href="/tx/{{tx_hash}}">Less details</a></h5>
{{/with_ring_signatures}}
{{/have_raw_tx}}
</div>