Skip to content

Commit

Permalink
wallet: can't decrypt payment id if tx key is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
tobtoht committed Sep 26, 2024
1 parent a1dc85c commit 31c6b2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 31c6b2a

Please sign in to comment.