aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwoodser <woodser@protonmail.com>2020-11-06 15:08:43 -0500
committerwoodser <woodser@protonmail.com>2022-01-23 08:31:15 -0500
commit1dcca961aeef0ebe13ca84e2a17b54a476d199ae (patch)
tree4c8039d33c6fe07516665aa06c480f632ffc7712 /src
parentMerge pull request #8096 (diff)
downloadmonero-1dcca961aeef0ebe13ca84e2a17b54a476d199ae.tar.xz
Balance includes unconfirmed payments
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet2.cpp8
1 files changed, 8 insertions, 0 deletions
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<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;
}