diff options
| author | selsta <selsta@sent.at> | 2026-05-13 20:04:27 +0200 |
|---|---|---|
| committer | selsta <selsta@sent.at> | 2026-05-13 20:08:57 +0200 |
| commit | 6db72c40e1764b04ab149114025da5fa7a1da7b6 (patch) | |
| tree | 4079f440e611472d2c5e720fa8524048d3dac32f | |
| parent | f9d202b736929ac7a0737cde7d9dd633d92ab1c7 (diff) | |
| download | monzero-core-6db72c40e1764b04ab149114025da5fa7a1da7b6.tar.gz monzero-core-6db72c40e1764b04ab149114025da5fa7a1da7b6.tar.xz monzero-core-6db72c40e1764b04ab149114025da5fa7a1da7b6.zip | |
wallet_rpc_server: preserve payment ID when editing address book
| -rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index da0a0a1c1..c86ae6862 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -3335,14 +3335,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"; |
