Merge pull request #10589

f095abd wallet_rpc_server: preserve payment ID when editing address book (selsta)
This commit is contained in:
tobtoht
2026-06-03 20:38:01 +00:00
2 changed files with 15 additions and 3 deletions
+3 -3
View File
@@ -3349,14 +3349,14 @@ namespace tools
}
entry.m_address = info.address;
entry.m_is_subaddress = info.is_subaddress;
if (info.has_payment_id)
entry.m_payment_id = info.payment_id;
entry.m_has_payment_id = info.has_payment_id;
entry.m_payment_id = info.has_payment_id ? info.payment_id : crypto::null_hash8;
}
if (req.set_description)
entry.m_description = req.description;
if (!m_wallet->set_address_book_row(req.index, entry.m_address, req.set_address && entry.m_has_payment_id ? &entry.m_payment_id : NULL, entry.m_description, entry.m_is_subaddress))
if (!m_wallet->set_address_book_row(req.index, entry.m_address, entry.m_has_payment_id ? &entry.m_payment_id : NULL, entry.m_description, entry.m_is_subaddress))
{
er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR;
er.message = "Failed to edit address book entry";