mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
total xmr spend added to Signed Key Images Checker
This commit is contained in:
parent
14f85fa45c
commit
314d679812
2 changed files with 14 additions and 0 deletions
11
src/page.h
11
src/page.h
|
@ -2033,6 +2033,8 @@ namespace xmreg {
|
|||
mstch::map context {
|
||||
{"testnet" , testnet},
|
||||
{"address" , xmreg::print_address(*xmr_address, testnet)},
|
||||
{"has_total_xmr" , false},
|
||||
{"total_xmr" , string{}},
|
||||
{"key_imgs" , mstch::array{}}
|
||||
};
|
||||
|
||||
|
@ -2054,6 +2056,8 @@ namespace xmreg {
|
|||
|
||||
mstch::array& key_imgs_ctx = boost::get<mstch::array>(context["key_imgs"]);
|
||||
|
||||
uint64_t total_xmr {0};
|
||||
|
||||
|
||||
for (size_t n = 0; n < no_key_images; ++n)
|
||||
{
|
||||
|
@ -2119,6 +2123,7 @@ namespace xmreg {
|
|||
if (it != tx_key_imgs.end())
|
||||
{
|
||||
key_img_info["amount"] = fmt::format("{:0.12f}", XMR_AMOUNT((*it).amount));
|
||||
total_xmr += (*it).amount;
|
||||
}
|
||||
|
||||
key_img_info["timestamp"] = xmreg::timestamp_to_str(blk_timestamp);
|
||||
|
@ -2130,6 +2135,12 @@ namespace xmreg {
|
|||
//signed_key_images.push_back(make_pair(key_image, signature));
|
||||
}
|
||||
|
||||
if (total_xmr > 0)
|
||||
{
|
||||
context["has_total_xmr"] = true;
|
||||
context["total_xmr"] = fmt::format("{:0.12f}", XMR_AMOUNT(total_xmr));
|
||||
}
|
||||
|
||||
string checkrawkeyimgs_html = xmreg::read(TMPL_MY_CHECKRAWKEYIMGS);
|
||||
|
||||
// add footer
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
</div>
|
||||
|
||||
<h4>Key images for address: {{address}}</h4>
|
||||
{{#has_total_xmr}}
|
||||
<h4>Total value of xmr spend: {{total_xmr}}</h4>
|
||||
{{/has_total_xmr}}
|
||||
|
||||
<div class="center">
|
||||
|
||||
|
|
Loading…
Reference in a new issue