From 1dcca961aeef0ebe13ca84e2a17b54a476d199ae Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 6 Nov 2020 15:08:43 -0500 Subject: Balance includes unconfirmed payments --- src/wallet/wallet2.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index cbdda4f72..66c77c413 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6049,6 +6049,14 @@ std::map wallet2::balance_per_subaddress(uint32_t index_majo found->second += utx.second.m_change; } } + + for (const auto& utx: m_unconfirmed_payments) + { + if (utx.second.m_pd.m_subaddr_index.major == index_major) + { + amount_per_subaddr[utx.second.m_pd.m_subaddr_index.minor] += utx.second.m_pd.m_amount; + } + } } return amount_per_subaddr; } -- cgit v1.2.3