mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
json representation of tx displied
This commit is contained in:
parent
2cf9714d21
commit
32c75e1a46
2 changed files with 17 additions and 1 deletions
12
src/page.h
12
src/page.h
|
@ -110,6 +110,8 @@ namespace xmreg {
|
|||
crypto::hash payment_id = null_hash; // normal
|
||||
crypto::hash8 payment_id8 = null_hash8; // encrypted
|
||||
|
||||
string json_representation;
|
||||
|
||||
std::vector<std::vector<crypto::signature> > signatures;
|
||||
|
||||
// key images of inputs
|
||||
|
@ -969,6 +971,8 @@ namespace xmreg {
|
|||
string pid8_str = REMOVE_HASH_BRAKETS(fmt::format("{:s}", txd.payment_id8));
|
||||
|
||||
|
||||
string tx_json = obj_to_json_str(tx);
|
||||
|
||||
// initalise page tempate map with basic info about blockchain
|
||||
mstch::map context {
|
||||
{"tx_hash" , tx_hash_str},
|
||||
|
@ -989,7 +993,9 @@ namespace xmreg {
|
|||
{"payment_id" , pid_str},
|
||||
{"payment_id8" , pid8_str},
|
||||
{"extra" , txd.get_extra_str()},
|
||||
{"with_ring_signatures" , static_cast<bool>(with_ring_signatures)}
|
||||
{"with_ring_signatures" , static_cast<bool>(
|
||||
with_ring_signatures)},
|
||||
{"tx_json" , tx_json}
|
||||
};
|
||||
|
||||
string server_time_str = xmreg::timestamp_to_str(server_timestamp, "%F");
|
||||
|
@ -2043,6 +2049,10 @@ namespace xmreg {
|
|||
|
||||
txd.fee = 0;
|
||||
|
||||
transaction tx_copy = tx;
|
||||
|
||||
txd.json_representation = obj_to_json_str(tx_copy);
|
||||
|
||||
if (!coinbase && tx.vin.size() > 0)
|
||||
{
|
||||
// check if not miner tx
|
||||
|
|
|
@ -46,6 +46,12 @@
|
|||
|
||||
</table>
|
||||
|
||||
<h3>JSON representaiton of tx</h3>
|
||||
<div class="center">
|
||||
<code style="white-space: pre-wrap; font-size: 10px">
|
||||
{{tx_json}}
|
||||
</code>
|
||||
</div>
|
||||
|
||||
<h3>{{outputs_no}} output(s) for total of {{outputs_xmr_sum}} xmr</h3>
|
||||
<div class="center">
|
||||
|
|
Loading…
Reference in a new issue