diff options
author | woodser <woodser@protonmail.com> | 2020-11-06 15:08:43 -0500 |
---|---|---|
committer | woodser <woodser@protonmail.com> | 2020-11-06 15:08:43 -0500 |
commit | ee58f4f766bbee89633748ece8ffe373722e79d8 (patch) | |
tree | 8a351642c8d61cdd58af8b153733951a36d4df3b /src/wallet/wallet2.cpp | |
parent | Merge pull request #6902 (diff) | |
download | monero-ee58f4f766bbee89633748ece8ffe373722e79d8.tar.xz |
Balance includes unconfirmed payments
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet2.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<uint32_t, uint64_t> 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; } |