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 | |
parent | ce336fdc21c25c055ffef28fbe7c61164df7ca24 (diff) |
Fix broken ExtractAddress (refactored, made callers check for addresses in keystore if they care)
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/transactiondesc.cpp | 6 | ||||
-rw-r--r-- | src/qt/transactionrecord.cpp | 4 |
2 files changed, 5 insertions, 5 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]) + " "; diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 53cd35b2da..f3dbd45c6d 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -80,7 +80,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet * if(wallet->IsMine(txout)) { CBitcoinAddress address; - if (ExtractAddress(txout.scriptPubKey, wallet, address)) + if (ExtractAddress(txout.scriptPubKey, address) && wallet->HaveKey(address)) { sub.address = address.ToString(); } @@ -138,7 +138,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet * // Sent to Bitcoin Address sub.type = TransactionRecord::SendToAddress; CBitcoinAddress address; - if (ExtractAddress(txout.scriptPubKey, 0, address)) + if (ExtractAddress(txout.scriptPubKey, address)) { sub.address = address.ToString(); } |