Skip to content

Commit

Permalink
Merge #9637: [Qt] fix transaction details output-index to reflect vou…
Browse files Browse the repository at this point in the history
…t index

04b8773 [Qt] fix transaction details output-index to reflect vout index (Jonas Schnelli)
  • Loading branch information
laanwj committed Jan 27, 2017
2 parents 9b4d267 + 04b8773 commit d9e4d1d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/qt/transactionrecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
//
// Credit
//
BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
for(unsigned int i = 0; i < wtx.tx->vout.size(); i++)
{
const CTxOut& txout = wtx.tx->vout[i];
isminetype mine = wallet->IsMine(txout);
if(mine)
{
TransactionRecord sub(hash, nTime);
CTxDestination address;
sub.idx = parts.size(); // sequence number
sub.idx = i; // vout index
sub.credit = txout.nValue;
sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY;
if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address))
Expand Down Expand Up @@ -118,7 +119,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
{
const CTxOut& txout = wtx.tx->vout[nOut];
TransactionRecord sub(hash, nTime);
sub.idx = parts.size();
sub.idx = nOut;
sub.involvesWatchAddress = involvesWatchAddress;

if(wallet->IsMine(txout))
Expand Down

0 comments on commit d9e4d1d

Please sign in to comment.