Balance includes unconfirmed payments

This commit is contained in:
woodser 2020-11-06 15:08:43 -05:00
parent ab18fea350
commit 1dcca961ae
1 changed files with 8 additions and 0 deletions

View File

@ -6049,6 +6049,14 @@ std::map<uint32_t, uint64_t> wallet2::balance_per_subaddress(uint32_t index_majo
found->second += utx.second.m_change; 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; return amount_per_subaddr;
} }