Handle unspendable inputs correctly.
[novacoin.git] / src / qt / transactionrecord.cpp
index 8962d18..20c263e 100644 (file)
@@ -25,7 +25,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
 {
     QList<TransactionRecord> parts;
     int64 nTime = wtx.GetTxTime();
-    int64 nCredit = wtx.GetCredit(true);
+    int64 nCredit = wtx.GetCredit(false,true);
     int64 nDebit = wtx.GetDebit();
     int64 nNet = nCredit - nDebit;
     uint256 hash = wtx.GetHash(), hashPrev = 0;
@@ -205,7 +205,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
     // For generated transactions, determine maturity
     if(type == TransactionRecord::Generated)
     {
-        int64 nCredit = wtx.GetCredit(true);
+        int64 nCredit = wtx.GetCredit(false,true);
         if (nCredit == 0)
         {
             status.maturity = TransactionStatus::Immature;