Merge pull request #8154

1dcca96 Balance includes unconfirmed payments (woodser)
This commit is contained in:
luigi1111 2022-03-18 16:27:39 -05:00
commit 08446535ff
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -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;
}