X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Ftransactionrecord.cpp;h=34d3edfc288bcb58f2a749f611693ca6e4e5bd38;hb=48564f02c4769f26295bedfc04b796246ad0d0bc;hp=20c263e1fdd2cb3a0afc178c43ceb3c8b301a27c;hpb=b0368da0e15b5506548da3462e14b038ca21ae69;p=novacoin.git diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 20c263e..34d3edf 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -24,10 +24,10 @@ bool TransactionRecord::showTransaction(const CWalletTx &wtx) QList TransactionRecord::decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx) { QList parts; - int64 nTime = wtx.GetTxTime(); - int64 nCredit = wtx.GetCredit(false,true); - int64 nDebit = wtx.GetDebit(); - int64 nNet = nCredit - nDebit; + int64_t nTime = wtx.GetTxTime(); + int64_t nCredit = wtx.GetCredit(MINE_ALL); + int64_t nDebit = wtx.GetDebit(MINE_ALL); + int64_t nNet = nCredit - nDebit; uint256 hash = wtx.GetHash(), hashPrev = 0; std::map mapValue = wtx.mapValue; @@ -90,7 +90,7 @@ QList TransactionRecord::decomposeTransaction(const CWallet * if (fAllFromMe && fAllToMe) { // Payment to self - int64 nChange = wtx.GetChange(); + int64_t nChange = wtx.GetChange(); parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "", -(nDebit - nChange), nCredit - nChange)); @@ -100,7 +100,7 @@ QList TransactionRecord::decomposeTransaction(const CWallet * // // Debit // - int64 nTxFee = nDebit - wtx.GetValueOut(); + int64_t nTxFee = nDebit - wtx.GetValueOut(); for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++) { @@ -129,7 +129,7 @@ QList TransactionRecord::decomposeTransaction(const CWallet * sub.address = mapValue["to"]; } - int64 nValue = txout.nValue; + int64_t nValue = txout.nValue; /* Add fee to first output */ if (nTxFee > 0) { @@ -205,8 +205,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) // For generated transactions, determine maturity if(type == TransactionRecord::Generated) { - int64 nCredit = wtx.GetCredit(false,true); - if (nCredit == 0) + if (wtx.GetBlocksToMaturity() > 0) { status.maturity = TransactionStatus::Immature;