From ee58f4f766bbee89633748ece8ffe373722e79d8 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(+) (limited to 'src/wallet/wallet2.cpp') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index a3755ff08..54d900601 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6017,6 +6017,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