add decrypting payments id8 obtained when using integrated address

master
moneroexamples 8 years ago
parent ec70839bd2
commit d2105d17cb

@ -1566,7 +1566,6 @@ namespace xmreg
<< e.what() << endl;
}
// get block cointaining this tx
block blk;
@ -1611,6 +1610,7 @@ namespace xmreg
{"has_payment_id8" , txd.payment_id8 != null_hash8},
{"payment_id" , pid_str},
{"payment_id8" , pid8_str},
{"decrypted_payment_id8", string{}},
{"tx_prove" , tx_prove}
};
@ -1635,6 +1635,17 @@ namespace xmreg
return string("Cant get key_derivation");
}
// decrypt encrypted payment id, as used in integreated addresses
crypto::hash8 decrypted_payment_id8 = txd.payment_id8;
if (decrypted_payment_id8 != null_hash8)
{
if (decrypt_payment_id(decrypted_payment_id8, pub_key, prv_view_key))
{
context["decrypted_payment_id8"] = pod_to_hex(decrypted_payment_id8);
}
}
mstch::array outputs;
uint64_t sum_xmr {0};

@ -10,7 +10,12 @@
{{/has_payment_id}}
{{#has_payment_id8}}
{{^decrypted_payment_id8}}
<H5 style="margin:5px">Payment id (encrypted): {{payment_id8}}</H5>
{{/decrypted_payment_id8}}
{{#decrypted_payment_id8}}
<H5 style="margin:5px">Payment id (decrypted): {{decrypted_payment_id8}}</H5>
{{/decrypted_payment_id8}}
{{/has_payment_id8}}

Loading…
Cancel
Save