aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-10-13 13:56:54 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-10-13 13:57:07 +0200
commitd7e195048342afae9168377cebfc22ab000728a5 (patch)
treeee5b07604ef073ef35d8aa13598fb7d6a4877bc4 /src/qt
parentf98bd4eae1bc6d57c27cc13d0495941f15eddf19 (diff)
parentccca27a788fe1ae13661308243c20a1d7a3d0074 (diff)
Merge pull request #4937
ccca27a [Wallet] Watch-only fixes (Cozz Lovan)
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/transactionrecord.cpp2
-rw-r--r--src/qt/walletmodel.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index afb343f349..5278c8673a 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -32,7 +32,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
{
QList<TransactionRecord> parts;
int64_t nTime = wtx.GetTxTime();
- CAmount nCredit = wtx.GetCredit(true);
+ CAmount nCredit = wtx.GetCredit(ISMINE_ALL);
CAmount nDebit = wtx.GetDebit(ISMINE_ALL);
CAmount nNet = nCredit - nDebit;
uint256 hash = wtx.GetHash();
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index b8701a23a6..b4733d369e 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -605,7 +605,8 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
int nDepth = wallet->mapWallet[outpoint.hash].GetDepthInMainChain();
if (nDepth < 0) continue;
COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth, true);
- vCoins.push_back(out);
+ if (outpoint.n < out.tx->vout.size() && wallet->IsMine(out.tx->vout[outpoint.n]) == ISMINE_SPENDABLE)
+ vCoins.push_back(out);
}
BOOST_FOREACH(const COutput& out, vCoins)