diff options
| author | Alexander Blair <snipa@jagtech.io> | 2020-01-25 16:54:08 -0800 |
|---|---|---|
| committer | Alexander Blair <snipa@jagtech.io> | 2020-01-25 16:54:08 -0800 |
| commit | a26e5b3d4248b925bf749b6a6408fccb381aee13 (patch) | |
| tree | dbba8d82ef4bfc7a14fcbf9de9066c8914ebbd12 /src/wallet/wallet2.cpp | |
| parent | 59e7d5686b9046f5892c4aad4e90ef810110d252 (diff) | |
| parent | dd8c6b170386b64ae1d4344c7abd93d7b814a43b (diff) | |
| download | monzero-core-a26e5b3d4248b925bf749b6a6408fccb381aee13.tar.gz monzero-core-a26e5b3d4248b925bf749b6a6408fccb381aee13.tar.xz monzero-core-a26e5b3d4248b925bf749b6a6408fccb381aee13.zip | |
Merge pull request #6158
dd8c6b17 wallet: do not split integrated addresses in address book api (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
| -rw-r--r-- | src/wallet/wallet2.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 5e3a8a08f..438c61370 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3151,11 +3151,12 @@ void wallet2::fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height, } -bool wallet2::add_address_book_row(const cryptonote::account_public_address &address, const crypto::hash &payment_id, const std::string &description, bool is_subaddress) +bool wallet2::add_address_book_row(const cryptonote::account_public_address &address, const crypto::hash8 *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_has_payment_id = !!payment_id; + a.m_payment_id = payment_id ? *payment_id : crypto::null_hash8; a.m_description = description; a.m_is_subaddress = is_subaddress; @@ -3166,11 +3167,12 @@ 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) +bool wallet2::set_address_book_row(size_t row_id, const cryptonote::account_public_address &address, const crypto::hash8 *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_has_payment_id = !!payment_id; + a.m_payment_id = payment_id ? *payment_id : crypto::null_hash8; a.m_description = description; a.m_is_subaddress = is_subaddress; |
