@@ -42,7 +42,7 @@ QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
42
42
}
43
43
}
44
44
45
- QString TransactionDesc::toHTML (CWallet *wallet, CWalletTx &wtx, int vout , int unit)
45
+ QString TransactionDesc::toHTML (CWallet *wallet, CWalletTx &wtx, TransactionRecord *rec , int unit)
46
46
{
47
47
QString strHTML;
48
48
@@ -86,26 +86,19 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
86
86
if (nNet > 0 )
87
87
{
88
88
// Credit
89
- BOOST_FOREACH ( const CTxOut& txout, wtx. vout )
89
+ if ( CBitcoinAddress (rec-> address ). IsValid () )
90
90
{
91
- if (wallet->IsMine (txout))
91
+ CTxDestination address = CBitcoinAddress (rec->address ).Get ();
92
+ if (wallet->mapAddressBook .count (address))
92
93
{
93
- CTxDestination address;
94
- if (ExtractDestination (txout.scriptPubKey , address) && IsMine (*wallet, address))
95
- {
96
- if (wallet->mapAddressBook .count (address))
97
- {
98
- strHTML += " <b>" + tr (" From" ) + " :</b> " + tr (" unknown" ) + " <br>" ;
99
- strHTML += " <b>" + tr (" To" ) + " :</b> " ;
100
- strHTML += GUIUtil::HtmlEscape (CBitcoinAddress (address).ToString ());
101
- if (!wallet->mapAddressBook [address].name .empty ())
102
- strHTML += " (" + tr (" own address" ) + " , " + tr (" label" ) + " : " + GUIUtil::HtmlEscape (wallet->mapAddressBook [address].name ) + " )" ;
103
- else
104
- strHTML += " (" + tr (" own address" ) + " )" ;
105
- strHTML += " <br>" ;
106
- }
107
- }
108
- break ;
94
+ strHTML += " <b>" + tr (" From" ) + " :</b> " + tr (" unknown" ) + " <br>" ;
95
+ strHTML += " <b>" + tr (" To" ) + " :</b> " ;
96
+ strHTML += GUIUtil::HtmlEscape (rec->address );
97
+ if (!wallet->mapAddressBook [address].name .empty ())
98
+ strHTML += " (" + tr (" own address" ) + " , " + tr (" label" ) + " : " + GUIUtil::HtmlEscape (wallet->mapAddressBook [address].name ) + " )" ;
99
+ else
100
+ strHTML += " (" + tr (" own address" ) + " )" ;
101
+ strHTML += " <br>" ;
109
102
}
110
103
}
111
104
}
@@ -224,7 +217,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
224
217
if (wtx.mapValue .count (" comment" ) && !wtx.mapValue [" comment" ].empty ())
225
218
strHTML += " <br><b>" + tr (" Comment" ) + " :</b><br>" + GUIUtil::HtmlEscape (wtx.mapValue [" comment" ], true ) + " <br>" ;
226
219
227
- strHTML += " <b>" + tr (" Transaction ID" ) + " :</b> " + TransactionRecord::formatSubTxId (wtx.GetHash (), vout ) + " <br>" ;
220
+ strHTML += " <b>" + tr (" Transaction ID" ) + " :</b> " + TransactionRecord::formatSubTxId (wtx.GetHash (), rec-> idx ) + " <br>" ;
228
221
229
222
// Message from normal bitcoin:URI (bitcoin:123...?message=example)
230
223
foreach (const PAIRTYPE (string, string)& r, wtx.vOrderForm )
0 commit comments