From da782cdd73eab2879db345f1f58a5efc1311b1bb Mon Sep 17 00:00:00 2001 From: sowle Date: Mon, 28 Oct 2019 21:07:34 +0300 Subject: [PATCH] wallet: fix for #47 --- src/wallet/wallet2.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index e8d9b357..5ffc9d8b 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -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;