aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionrecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/transactionrecord.cpp')
-rw-r--r--src/qt/transactionrecord.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 017244ffd0..160973638d 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -1,6 +1,7 @@
#include "transactionrecord.h"
#include "wallet.h"
+#include "base58.h"
/* Return positive answer if transaction should be shown in list.
*/
@@ -50,7 +51,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
if(wallet->IsMine(txout))
{
TransactionRecord sub(hash, nTime);
- CBitcoinAddress address;
+ CTxDestination address;
sub.idx = parts.size(); // sequence number
sub.credit = txout.nValue;
if (wtx.IsCoinBase())
@@ -58,11 +59,11 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
// Generated
sub.type = TransactionRecord::Generated;
}
- else if (ExtractAddress(txout.scriptPubKey, address) && wallet->HaveKey(address))
+ else if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address))
{
// Received by Bitcoin Address
sub.type = TransactionRecord::RecvWithAddress;
- sub.address = address.ToString();
+ sub.address = CBitcoinAddress(address).ToString();
}
else
{
@@ -113,12 +114,12 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
continue;
}
- CBitcoinAddress address;
- if (ExtractAddress(txout.scriptPubKey, address))
+ CTxDestination address;
+ if (ExtractDestination(txout.scriptPubKey, address))
{
// Sent to Bitcoin Address
sub.type = TransactionRecord::SendToAddress;
- sub.address = address.ToString();
+ sub.address = CBitcoinAddress(address).ToString();
}
else
{