aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/wallet.cpp')
-rw-r--r--src/interfaces/wallet.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index 645a8709d2..d55b92a5ff 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -151,8 +151,8 @@ public:
std::string* purpose) override
{
LOCK(m_wallet->cs_wallet);
- auto it = m_wallet->mapAddressBook.find(dest);
- if (it == m_wallet->mapAddressBook.end()) {
+ auto it = m_wallet->m_address_book.find(dest);
+ if (it == m_wallet->m_address_book.end() || it->second.IsChange()) {
return false;
}
if (name) {
@@ -170,7 +170,8 @@ public:
{
LOCK(m_wallet->cs_wallet);
std::vector<WalletAddress> result;
- for (const auto& item : m_wallet->mapAddressBook) {
+ for (const auto& item : m_wallet->m_address_book) {
+ if (item.second.IsChange()) continue;
result.emplace_back(item.first, m_wallet->IsMine(item.first), item.second.name, item.second.purpose);
}
return result;