diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-22 15:51:44 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-22 15:57:31 -0500 |
commit | 2e17ac83c65b65fe2037b8c8941c25e288905903 (patch) | |
tree | 143d73d45bae5e0046ac994a3432f4353d9c0382 /src/qt/transactiondesc.cpp | |
parent | ce336fdc21c25c055ffef28fbe7c61164df7ca24 (diff) |
Fix broken ExtractAddress (refactored, made callers check for addresses in keystore if they care)
Diffstat (limited to 'src/qt/transactiondesc.cpp')
-rw-r--r-- | src/qt/transactiondesc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index 6ca3ac8c4b..821ef98131 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -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]) + " "; |