diff options
author | luigi1111 <luigi1111w@gmail.com> | 2022-03-18 16:27:39 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2022-03-18 16:27:39 -0500 |
commit | 08446535ff7860384329407938a61bc91c64db56 (patch) | |
tree | 0cd179103348ab198eb38b067093ce2517def033 | |
parent | Merge pull request #8163 (diff) | |
parent | Balance includes unconfirmed payments (diff) | |
download | monero-08446535ff7860384329407938a61bc91c64db56.tar.xz |
Merge pull request #8154
1dcca96 Balance includes unconfirmed payments (woodser)
-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 8f8fc7160..138d57e67 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6050,6 +6050,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; } |