mirror of
https://github.com/monero-project/monero.git
synced 2025-08-24 04:45:12 -04:00
wallet: add edit_address_book RPC
This commit is contained in:
parent
4ff40d8d9a
commit
cc4be4fa15
7 changed files with 241 additions and 7 deletions
|
@ -3080,6 +3080,21 @@ bool wallet2::add_address_book_row(const cryptonote::account_public_address &add
|
|||
return false;
|
||||
}
|
||||
|
||||
bool wallet2::set_address_book_row(size_t row_id, const cryptonote::account_public_address &address, const crypto::hash &payment_id, const std::string &description, bool is_subaddress)
|
||||
{
|
||||
wallet2::address_book_row a;
|
||||
a.m_address = address;
|
||||
a.m_payment_id = payment_id;
|
||||
a.m_description = description;
|
||||
a.m_is_subaddress = is_subaddress;
|
||||
|
||||
const auto size = m_address_book.size();
|
||||
if (row_id >= size)
|
||||
return false;
|
||||
m_address_book[row_id] = a;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wallet2::delete_address_book_row(std::size_t row_id) {
|
||||
if(m_address_book.size() <= row_id)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue