diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-01 12:29:12 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-09-17 11:38:23 +0000 |
commit | cc4be4fa15eba582cc6ab529bd0215e642205ad4 (patch) | |
tree | 5f0a42d25ba81d8f909650b3e81b7f80281803c9 /src/wallet/wallet2.cpp | |
parent | functional_tests: add address book tests (diff) | |
download | monero-cc4be4fa15eba582cc6ab529bd0215e642205ad4.tar.xz |
wallet: add edit_address_book RPC
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet2.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 86a606fb1..24fda9532 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -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; |