wallet: can't decrypt payment id if tx key is missing

This commit is contained in:
tobtoht 2024-09-26 14:20:24 +02:00
parent a1dc85c537
commit 31c6b2a901
No known key found for this signature in database
GPG Key ID: E45B10DD027D2472

View File

@ -7502,6 +7502,11 @@ crypto::hash wallet2::get_payment_id(const pending_tx &ptx) const
MWARNING("Encrypted payment id found, but no destinations public key, cannot decrypt");
return crypto::null_hash;
}
if (ptx.tx_key == crypto::null_skey)
{
MWARNING("Encrypted payment id found, but no tx secret key, cannot decrypt");
return crypto::null_hash;
}
if (m_account.get_device().decrypt_payment_id(payment_id8, ptx.dests[0].addr.m_view_public_key, ptx.tx_key))
{
memcpy(payment_id.data, payment_id8.data, 8);