showing tx with and without ring signatures added

master
moneroexamples 9 years ago
parent 88701d0d91
commit c47d53f6e0

@ -94,6 +94,11 @@ int main(int ac, const char* av[]) {
return xmrblocks.show_tx(tx_hash);
});
CROW_ROUTE(app, "/tx/<string>/<uint>")
([&](string tx_hash, uint with_ring_signatures) {
return xmrblocks.show_tx(tx_hash, with_ring_signatures);
});
CROW_ROUTE(app, "/search").methods("GET"_method)
([&](const crow::request& req) {

@ -620,7 +620,7 @@ namespace xmreg {
}
string
show_tx(string tx_hash_str)
show_tx(string tx_hash_str, uint with_ring_signatures = 0)
{
// parse tx hash string to hash object
@ -729,6 +729,7 @@ namespace xmreg {
{"has_payment_id8" , txd.payment_id8 != null_hash8},
{"payment_id" , pid_str},
{"payment_id8" , pid8_str},
{"with_ring_signatures" , static_cast<bool>(with_ring_signatures)}
};
string server_time_str = xmreg::timestamp_to_str(server_timestamp, "%F");

@ -97,6 +97,8 @@
</tr>
{{#with_ring_signatures}}
<tr>
<td colspan="2">
<table style="width:100%; margin-bottom:20px">
@ -112,10 +114,19 @@
</td>
</tr>
{{/with_ring_signatures}}
{{/inputs}}
</table>
{{^with_ring_signatures}}
<h5 style="margin-top:1px"><a href="/tx/{{tx_hash}}/1">Show this tx with ring signature for each input</a></h5>
{{/with_ring_signatures}}
{{#with_ring_signatures}}
<h5 style="margin-top:1px"><a href="/tx/{{tx_hash}}">Show this tx without ring signature for each input</a></h5>
{{/with_ring_signatures}}
</div>

Loading…
Cancel
Save