|
|
@ -70,16 +70,19 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
sub.type = TransactionRecord::Generated;
|
|
|
|
sub.type = TransactionRecord::Generated;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sub.involvesWatchAddress = mine == MINE_WATCH_ONLY;
|
|
|
|
parts.append(sub);
|
|
|
|
parts.append(sub);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
bool involvesWatchAddress = false;
|
|
|
|
isminetype fAllFromMe = MINE_SPENDABLE;
|
|
|
|
isminetype fAllFromMe = MINE_SPENDABLE;
|
|
|
|
BOOST_FOREACH(const CTxIn& txin, wtx.vin)
|
|
|
|
BOOST_FOREACH(const CTxIn& txin, wtx.vin)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isminetype mine = wallet->IsMine(txin);
|
|
|
|
isminetype mine = wallet->IsMine(txin);
|
|
|
|
|
|
|
|
if(mine == MINE_WATCH_ONLY) involvesWatchAddress = true;
|
|
|
|
if(fAllFromMe > mine) fAllFromMe = mine;
|
|
|
|
if(fAllFromMe > mine) fAllFromMe = mine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -87,6 +90,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
|
|
|
|
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isminetype mine = wallet->IsMine(txout);
|
|
|
|
isminetype mine = wallet->IsMine(txout);
|
|
|
|
|
|
|
|
if(mine == MINE_WATCH_ONLY) involvesWatchAddress = true;
|
|
|
|
if(fAllToMe > mine) fAllToMe = mine;
|
|
|
|
if(fAllToMe > mine) fAllToMe = mine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -97,6 +101,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
|
|
|
|
|
|
|
|
parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
|
|
|
|
parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
|
|
|
|
-(nDebit - nChange), nCredit - nChange));
|
|
|
|
-(nDebit - nChange), nCredit - nChange));
|
|
|
|
|
|
|
|
parts.last().involvesWatchAddress = involvesWatchAddress;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (fAllFromMe)
|
|
|
|
else if (fAllFromMe)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -141,6 +146,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sub.debit = -nValue;
|
|
|
|
sub.debit = -nValue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sub.involvesWatchAddress = involvesWatchAddress;
|
|
|
|
parts.append(sub);
|
|
|
|
parts.append(sub);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -150,6 +156,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|
|
|
// Mixed debit transaction, can't break down payees
|
|
|
|
// Mixed debit transaction, can't break down payees
|
|
|
|
//
|
|
|
|
//
|
|
|
|
parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", nNet, 0));
|
|
|
|
parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", nNet, 0));
|
|
|
|
|
|
|
|
parts.last().involvesWatchAddress = involvesWatchAddress;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|