aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionrecord.cpp
diff options
context:
space:
mode:
authorJaSK <temp@temp.temp>2014-03-29 05:15:28 +0100
committerJaSK <temp@temp.temp>2014-07-02 15:48:38 +0200
commitffd40da361639faeef405c7e4a504a340d77aa5b (patch)
tree66131441451335db0f91a7d19cfddb9665aa82f1 /src/qt/transactionrecord.cpp
parent2935b211033610d7ef0deef9bf1b344a5bac029f (diff)
downloadbitcoin-ffd40da361639faeef405c7e4a504a340d77aa5b.tar.xz
Watchonly balances are shown separately in gui.
Diffstat (limited to 'src/qt/transactionrecord.cpp')
-rw-r--r--src/qt/transactionrecord.cpp17
1 files changed, 12 insertions, 5 deletions
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> 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> 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)
{