details of raw signed txs are shown using tx_details partial

master
moneroexamples 8 years ago
parent ec314773f2
commit 92a509cd2f

@ -1286,6 +1286,7 @@ namespace xmreg {
mstch::map context { mstch::map context {
{"testnet" , testnet}, {"testnet" , testnet},
{"unsigned_tx_given" , unsigned_tx_given}, {"unsigned_tx_given" , unsigned_tx_given},
{"have_raw_tx" , true},
{"txs" , mstch::array{}} {"txs" , mstch::array{}}
}; };
@ -1474,11 +1475,9 @@ namespace xmreg {
for (tools::wallet2::pending_tx& ptx: ptxs) 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(tx_context);
boost::get<mstch::array>(context["txs"]).push_back(txd_map);
} }
} }

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

Loading…
Cancel
Save