add_tx_pub_keys hidden html span added
This commit is contained in:
parent
ac23814b1d
commit
15c94340c0
10
src/page.h
10
src/page.h
|
@ -5538,10 +5538,20 @@ namespace xmreg
|
||||||
{"construction_time" , string {}},
|
{"construction_time" , string {}},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// append tx_json as in raw format to html
|
||||||
context["tx_json_raw"] = mstch::lambda{[=](const std::string& text) -> mstch::node {
|
context["tx_json_raw"] = mstch::lambda{[=](const std::string& text) -> mstch::node {
|
||||||
return tx_json;
|
return tx_json;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
// append additional public tx keys, if there are any, to the html context
|
||||||
|
|
||||||
|
string add_tx_pub_keys;
|
||||||
|
|
||||||
|
for (auto const& apk: txd.additional_pks)
|
||||||
|
add_tx_pub_keys += pod_to_hex(apk) + ";";
|
||||||
|
|
||||||
|
context["add_tx_pub_keys"] = add_tx_pub_keys;
|
||||||
|
|
||||||
string server_time_str = xmreg::timestamp_to_str_gm(server_timestamp, "%F");
|
string server_time_str = xmreg::timestamp_to_str_gm(server_timestamp, "%F");
|
||||||
|
|
||||||
mstch::array inputs = mstch::array{};
|
mstch::array inputs = mstch::array{};
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<H5 style="margin:5px">Tx prefix hash: {{tx_prefix_hash}}</H5>
|
<H5 style="margin:5px">Tx prefix hash: {{tx_prefix_hash}}</H5>
|
||||||
{{/enable_mixins_details}}
|
{{/enable_mixins_details}}
|
||||||
<H5 style="margin:5px">Tx public key: <span id="tx_pub_key">{{tx_pub_key}}</span></H5>
|
<H5 style="margin:5px">Tx public key: <span id="tx_pub_key">{{tx_pub_key}}</span></H5>
|
||||||
|
<span id="add_tx_pub_keys" style="display: none;">{{add_tx_pub_keys}}</span>
|
||||||
|
|
||||||
{{#has_payment_id}}
|
{{#has_payment_id}}
|
||||||
<H5 style="margin:5px">Payment id: <span id="payment_id">{{payment_id}}</span></H5>
|
<H5 style="margin:5px">Payment id: <span id="payment_id">{{payment_id}}</span></H5>
|
||||||
|
@ -172,6 +173,10 @@
|
||||||
|
|
||||||
var tx_public_key = $("#tx_pub_key").text();
|
var tx_public_key = $("#tx_pub_key").text();
|
||||||
|
|
||||||
|
var add_tx_pub_keys = $("#add_tx_pub_keys").text().split(';');
|
||||||
|
|
||||||
|
console.log("add_tx_pub_keys: " + add_tx_pub_keys);
|
||||||
|
|
||||||
var payment_id = $("#payment_id").text();
|
var payment_id = $("#payment_id").text();
|
||||||
|
|
||||||
|
|
||||||
|
@ -185,10 +190,13 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var address_decoded = decode_address(address);
|
try {
|
||||||
|
var address_decoded = decode_address(address);
|
||||||
decodeOutputs(tx_json, tx_public_key, viewkey, address_decoded.spend, payment_id);
|
decodeOutputs(tx_json, tx_public_key, viewkey, address_decoded.spend, payment_id);
|
||||||
|
} catch(err){
|
||||||
|
console.log(err);
|
||||||
|
$("#decode-prove-results").html('<h4>Error:' + err.message + '</h4>' );
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#prove_btn").click(function() {
|
$("#prove_btn").click(function() {
|
||||||
|
@ -201,10 +209,13 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var address_decoded = decode_address(address);
|
try {
|
||||||
|
var address_decoded = decode_address(address);
|
||||||
decodeOutputs(tx_json, address_decoded.view, tx_prv_key, address_decoded.spend, payment_id);
|
decodeOutputs(tx_json, address_decoded.view, tx_prv_key, address_decoded.spend, payment_id);
|
||||||
|
} catch(err){
|
||||||
|
console.log(err);
|
||||||
|
$("#decode-prove-results").html('<h4>Error:' + err.message + '</h4>' );
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue