mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-08 19:53:27 +01:00
Fix broken ExtractAddress (refactored, made callers check for addresses in keystore if they care)
This commit is contained in:
@@ -99,7 +99,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
|
||||
if (wallet->IsMine(txout))
|
||||
{
|
||||
CBitcoinAddress address;
|
||||
if (ExtractAddress(txout.scriptPubKey, wallet, address))
|
||||
if (ExtractAddress(txout.scriptPubKey, address) && wallet->HaveKey(address))
|
||||
{
|
||||
if (wallet->mapAddressBook.count(address))
|
||||
{
|
||||
@@ -184,7 +184,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
|
||||
{
|
||||
// Offline transaction
|
||||
CBitcoinAddress address;
|
||||
if (ExtractAddress(txout.scriptPubKey, 0, address))
|
||||
if (ExtractAddress(txout.scriptPubKey, address))
|
||||
{
|
||||
strHTML += tr("<b>To:</b> ");
|
||||
if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].empty())
|
||||
@@ -271,7 +271,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
|
||||
strHTML += "<li>";
|
||||
const CTxOut &vout = prev.vout[prevout.n];
|
||||
CBitcoinAddress address;
|
||||
if (ExtractAddress(vout.scriptPubKey, 0, address))
|
||||
if (ExtractAddress(vout.scriptPubKey, address))
|
||||
{
|
||||
if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].empty())
|
||||
strHTML += HtmlEscape(wallet->mapAddressBook[address]) + " ";
|
||||
|
||||
Reference in New Issue
Block a user