MCPcopy Create free account
hub / github.com/ElementsProject/elements / addressColor

Method addressColor

src/qt/transactiontablemodel.cpp:438–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const
439{
440 // Show addresses without label in a less visible color
441 switch(wtx->type)
442 {
443 case TransactionRecord::RecvWithAddress:
444 case TransactionRecord::SendToAddress:
445 case TransactionRecord::Generated:
446 case TransactionRecord::IssuedAsset:
447 {
448 QString label = walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(wtx->address));
449 if(label.isEmpty())
450 return COLOR_BAREADDRESS;
451 } break;
452 case TransactionRecord::SendToSelf:
453 return COLOR_BAREADDRESS;
454 default:
455 break;
456 }
457 return QVariant();
458}
459
460QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed, BitcoinUnits::SeparatorStyle separators) const
461{

Callers

nothing calls this directly

Calls 2

labelForAddressMethod · 0.80
getAddressTableModelMethod · 0.80

Tested by

no test coverage detected