Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/qt/transactionrecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interface
if(mine)
{
TransactionRecord sub(hash, nTime);
CTxDestination address;
sub.idx = i; // vout index
sub.credit = txout.nValue;
sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY;
Expand All @@ -59,7 +58,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interface
// Received by Dash Address
sub.type = TransactionRecord::RecvWithAddress;
sub.strAddress = EncodeDestination(wtx.txout_address[i]);
sub.txDest = address;
sub.txDest = wtx.txout_address[i];
}
else
{
Expand Down
14 changes: 11 additions & 3 deletions src/qt/transactiontablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include <qt/transactiontablemodel.h>

#include <qt/addresstablemodel.h>
#include <qt/guiutil.h>
#include <qt/optionsmodel.h>
#include <qt/transactiondesc.h>
Expand Down Expand Up @@ -205,6 +204,15 @@ class TransactionTablePriv
int64_t adjustedTime;
if (rec->statusUpdateNeeded(numBlocks, parent->getChainLockHeight()) && wallet.tryGetTxStatus(rec->hash, wtx, adjustedTime)) {
rec->updateStatus(wtx, numBlocks, adjustedTime, parent->getChainLockHeight());
// Update label
if (IsValidDestination(rec->txDest)) {
std::string name;
if (wallet.getAddress(rec->txDest, &name)) {
rec->status.label = QString::fromStdString(name);
} else {
rec->status.label = "";
}
}
}
return rec;
}
Expand Down Expand Up @@ -451,9 +459,9 @@ QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const
case TransactionRecord::PrivateSend:
case TransactionRecord::RecvWithPrivateSend:
{
QString label = walletModel->getAddressTableModel()->labelForDestination(wtx->txDest);
if(label.isEmpty())
if (wtx->status.label.isEmpty()) {
return GUIUtil::getThemedQColor(GUIUtil::ThemedColor::BAREADDRESS);
}
} break;
case TransactionRecord::SendToSelf:
case TransactionRecord::PrivateSendCreateDenominations:
Expand Down