aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-02-15 21:36:48 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-02-15 21:36:48 -0500
commit4ee301c687fefe928102024bf772ee511eed7df5 (patch)
treefe7e94a965dc15e968385964279afa0eecd865c6 /src
parentMerge pull request #6959 (diff)
parentBalance includes unconfirmed payments (diff)
downloadmonero-4ee301c687fefe928102024bf772ee511eed7df5.tar.xz
Merge pull request #6986
ee58f4f Balance includes unconfirmed payments (woodser)
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 d80335db8..aef9eaded 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -6042,6 +6042,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;
}