-#include <QtGlobal>
-
#include "transactionrecord.h"
#include "headers.h"
QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx)
{
QList<TransactionRecord> parts;
- qint64 nTime = wtx.nTimeDisplayed = wtx.GetTxTime();
- qint64 nCredit = wtx.GetCredit(true);
- qint64 nDebit = wtx.GetDebit();
- qint64 nNet = nCredit - nDebit;
+ int64 nTime = wtx.nTimeDisplayed = wtx.GetTxTime();
+ int64 nCredit = wtx.GetCredit(true);
+ int64 nDebit = wtx.GetDebit();
+ int64 nNet = nCredit - nDebit;
uint256 hash = wtx.GetHash();
std::map<std::string, std::string> mapValue = wtx.mapValue;
if (nCredit == 0)
{
- qint64 nUnmatured = 0;
+ int64 nUnmatured = 0;
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
nUnmatured += wallet->GetCredit(txout);
sub.credit = nUnmatured;
if (fAllFromMe && fAllToMe)
{
// Payment to self
- qint64 nChange = wtx.GetChange();
+ int64 nChange = wtx.GetChange();
parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
-(nDebit - nChange), nCredit - nChange));
//
// Debit
//
- qint64 nTxFee = nDebit - wtx.GetValueOut();
+ int64 nTxFee = nDebit - wtx.GetValueOut();
for (int nOut = 0; nOut < wtx.vout.size(); nOut++)
{
}
}
- qint64 nValue = txout.nValue;
+ int64 nValue = txout.nValue;
/* Add fee to first output */
if (nTxFee > 0)
{
// For generated transactions, determine maturity
if(type == TransactionRecord::Generated)
{
- qint64 nCredit = wtx.GetCredit(true);
+ int64 nCredit = wtx.GetCredit(true);
if (nCredit == 0)
{
status.maturity = TransactionStatus::Immature;