Watchonly transactions are marked in transaction history

This commit is contained in:
JaSK
2014-04-05 21:36:48 +02:00
parent ffd40da361
commit d2692f6116
3 changed files with 17 additions and 4 deletions

View File

@@ -390,19 +390,22 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx
QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
{
// mark transactions involving watch-only addresses:
QString watchAddress = wtx->involvesWatchAddress ? " (w) " : "";
switch(wtx->type)
{
case TransactionRecord::RecvFromOther:
return QString::fromStdString(wtx->address);
return QString::fromStdString(wtx->address) + watchAddress;
case TransactionRecord::RecvWithAddress:
case TransactionRecord::SendToAddress:
case TransactionRecord::Generated:
return lookupAddress(wtx->address, tooltip);
return lookupAddress(wtx->address, tooltip) + watchAddress;
case TransactionRecord::SendToOther:
return QString::fromStdString(wtx->address);
return QString::fromStdString(wtx->address) + watchAddress;
case TransactionRecord::SendToSelf:
default:
return tr("(n/a)");
return tr("(n/a)") + watchAddress;
}
}