pass tx_json from c++ into js variable.
This commit is contained in:
parent
d3481a0d26
commit
1459b30dd4
|
@ -5528,6 +5528,10 @@ namespace xmreg
|
||||||
{"construction_time" , string {}},
|
{"construction_time" , string {}},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
context["tx_json_raw"] = mstch::lambda{[=](const std::string& text) -> mstch::node {
|
||||||
|
return tx_json;
|
||||||
|
}};
|
||||||
|
|
||||||
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{};
|
||||||
|
@ -6186,7 +6190,6 @@ namespace xmreg
|
||||||
add_js_files(mstch::map& context)
|
add_js_files(mstch::map& context)
|
||||||
{
|
{
|
||||||
context["js_files"] = mstch::lambda{[&](const std::string& text) -> mstch::node {
|
context["js_files"] = mstch::lambda{[&](const std::string& text) -> mstch::node {
|
||||||
|
|
||||||
return this->js_html_files;
|
return this->js_html_files;
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,11 @@
|
||||||
|
|
||||||
// we need output pubplic keys, their indexes and amounts.
|
// we need output pubplic keys, their indexes and amounts.
|
||||||
// all this is already avaliable on the html, but we can use
|
// all this is already avaliable on the html, but we can use
|
||||||
// musch frramework to produce js array for this
|
// musch framework to produce js array for this
|
||||||
|
|
||||||
|
var tx_json = {{#tx_json_raw}}{{/tx_json_raw}};
|
||||||
|
|
||||||
|
console.log(tx_json);
|
||||||
|
|
||||||
var is_rct = ($("#is_ringct").val() === "yes");
|
var is_rct = ($("#is_ringct").val() === "yes");
|
||||||
var rct_type = parseInt($("#ringct_type").val());
|
var rct_type = parseInt($("#ringct_type").val());
|
||||||
|
|
Loading…
Reference in New Issue