From 93d8486662b45c0b64243b26878830ef4097df7a Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 6 Nov 2020 15:08:43 -0500 Subject: [PATCH] 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 3691e179c..970874776 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6440,6 +6440,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; }