1
0
Fork 0
forked from lthn/blockchain

wallet: fix for #47

This commit is contained in:
sowle 2019-10-28 21:07:34 +03:00
parent 706395e88e
commit da782cdd73
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -2230,7 +2230,7 @@ uint64_t wallet2::balance(uint64_t& unlocked, uint64_t& awaiting_in, uint64_t& a
for(auto& td : m_transfers)
{
if (td.is_spendable() || td.is_reserved_for_escrow())
if (td.is_spendable() || (td.is_reserved_for_escrow() && !td.is_spent()))
{
balance_total += td.amount();
if (is_transfer_unlocked(td))
@ -2242,9 +2242,6 @@ uint64_t wallet2::balance(uint64_t& unlocked, uint64_t& awaiting_in, uint64_t& a
for(auto& utx : m_unconfirmed_txs)
{
if (utx.second.contract.size())
continue; // skip unconfirmed contract tx
if (utx.second.is_income)
{
balance_total += utx.second.amount;