mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
[Qt] minor watch-only changes
- use watch-only, not watchonly - add back a tooltip hint when hovering addresses and attach "(watch-only)" at the end
This commit is contained in:
parent
3ed668dbe2
commit
fbe0fcae76
4 changed files with 13 additions and 7 deletions
|
|
@ -394,19 +394,25 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx
|
|||
|
||||
QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
|
||||
{
|
||||
QString watchAddress;
|
||||
if (tooltip) {
|
||||
// Mark transactions involving watch-only addresses by adding " (watch-only)"
|
||||
watchAddress = wtx->involvesWatchAddress ? QString(" (") + tr("watch-only") + QString(")") : "";
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue