aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2020-02-22 04:16:36 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2020-04-02 16:25:17 +0000
commitc751d886f499257627b308b11ffaa51c22db6cc0 (patch)
treeda16f6fe7552691501c4ae52e191c2e8f0931a4f /src/interfaces
parent8e64b8c84bcbd63caea06f3af087af1f0609eaf5 (diff)
Wallet: Avoid treating change-in-the-addressbook as non-change everywhere
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/wallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index 673d5d498f..d55b92a5ff 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -152,7 +152,7 @@ public:
{
LOCK(m_wallet->cs_wallet);
auto it = m_wallet->m_address_book.find(dest);
- if (it == m_wallet->m_address_book.end()) {
+ if (it == m_wallet->m_address_book.end() || it->second.IsChange()) {
return false;
}
if (name) {
@@ -171,6 +171,7 @@ public:
LOCK(m_wallet->cs_wallet);
std::vector<WalletAddress> result;
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;