From ffd40da361639faeef405c7e4a504a340d77aa5b Mon Sep 17 00:00:00 2001 From: JaSK Date: Sat, 29 Mar 2014 05:15:28 +0100 Subject: Watchonly balances are shown separately in gui. --- src/qt/transactionrecord.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/qt/transactionrecord.cpp') diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 21f1b7356f..3d77d39893 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -45,7 +45,8 @@ QList TransactionRecord::decomposeTransaction(const CWallet * // BOOST_FOREACH(const CTxOut& txout, wtx.vout) { - if(wallet->IsMine(txout)) + isminetype mine = wallet->IsMine(txout); + if(mine) { TransactionRecord sub(hash, nTime); CTxDestination address; @@ -75,13 +76,19 @@ QList TransactionRecord::decomposeTransaction(const CWallet * } else { - bool fAllFromMe = true; + isminetype fAllFromMe = MINE_SPENDABLE; BOOST_FOREACH(const CTxIn& txin, wtx.vin) - fAllFromMe = fAllFromMe && wallet->IsMine(txin); + { + isminetype mine = wallet->IsMine(txin); + if(fAllFromMe > mine) fAllFromMe = mine; + } - bool fAllToMe = true; + isminetype fAllToMe = MINE_SPENDABLE; BOOST_FOREACH(const CTxOut& txout, wtx.vout) - fAllToMe = fAllToMe && wallet->IsMine(txout); + { + isminetype mine = wallet->IsMine(txout); + if(fAllToMe > mine) fAllToMe = mine; + } if (fAllFromMe && fAllToMe) { -- cgit v1.2.3