aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorwoodser <woodser@protonmail.com>2020-11-06 15:08:43 -0500
committerwoodser <woodser@protonmail.com>2020-11-06 15:08:43 -0500
commitee58f4f766bbee89633748ece8ffe373722e79d8 (patch)
tree8a351642c8d61cdd58af8b153733951a36d4df3b /src/wallet/wallet2.cpp
parentMerge pull request #6902 (diff)
downloadmonero-ee58f4f766bbee89633748ece8ffe373722e79d8.tar.xz
Balance includes unconfirmed payments
Diffstat (limited to '')
-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 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;
}