|
|
|
@ -52,6 +52,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
@@ -52,6 +52,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
|
CTxDestination address; |
|
|
|
|
sub.idx = parts.size(); // sequence number
|
|
|
|
|
sub.credit = txout.nValue; |
|
|
|
|
sub.involvesWatchAddress = mine == MINE_WATCH_ONLY; |
|
|
|
|
if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address)) |
|
|
|
|
{ |
|
|
|
|
// Received by Bitcoin Address
|
|
|
|
@ -70,7 +71,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
@@ -70,7 +71,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
|
sub.type = TransactionRecord::Generated; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub.involvesWatchAddress = mine == MINE_WATCH_ONLY; |
|
|
|
|
parts.append(sub); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -101,7 +101,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
@@ -101,7 +101,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
|
|
|
|
|
|
parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "", |
|
|
|
|
-(nDebit - nChange), nCredit - nChange)); |
|
|
|
|
parts.last().involvesWatchAddress = involvesWatchAddress; |
|
|
|
|
parts.last().involvesWatchAddress = involvesWatchAddress; // maybe pass to TransactionRecord as constructor argument
|
|
|
|
|
} |
|
|
|
|
else if (fAllFromMe) |
|
|
|
|
{ |
|
|
|
@ -115,6 +115,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
@@ -115,6 +115,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
|
const CTxOut& txout = wtx.vout[nOut]; |
|
|
|
|
TransactionRecord sub(hash, nTime); |
|
|
|
|
sub.idx = parts.size(); |
|
|
|
|
sub.involvesWatchAddress = involvesWatchAddress; |
|
|
|
|
|
|
|
|
|
if(wallet->IsMine(txout)) |
|
|
|
|
{ |
|
|
|
@ -146,7 +147,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
@@ -146,7 +147,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
|
} |
|
|
|
|
sub.debit = -nValue; |
|
|
|
|
|
|
|
|
|
sub.involvesWatchAddress = involvesWatchAddress; |
|
|
|
|
parts.append(sub); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|