forked from lthn/blockchain
wallet: fix for #47
This commit is contained in:
parent
706395e88e
commit
da782cdd73
1 changed files with 1 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue