GUI: Display label rather than address on popups
This commit is contained in:
@@ -859,18 +859,18 @@ void BitcoinGUI::closeEvent(QCloseEvent *event)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address)
|
||||
void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label)
|
||||
{
|
||||
// On new transaction, make an info balloon
|
||||
QString msg = tr("Date: %1\n").arg(date) +
|
||||
tr("Amount: %1\n").arg(BitcoinUnits::formatWithUnit(unit, amount, true)) +
|
||||
tr("Type: %1\n").arg(type);
|
||||
if (!label.isEmpty())
|
||||
msg += tr("Label: %1\n").arg(label);
|
||||
else if (!address.isEmpty())
|
||||
msg += tr("Address: %1\n").arg(address);
|
||||
message((amount)<0 ? tr("Sent transaction") : tr("Incoming transaction"),
|
||||
tr("Date: %1\n"
|
||||
"Amount: %2\n"
|
||||
"Type: %3\n"
|
||||
"Address: %4\n")
|
||||
.arg(date)
|
||||
.arg(BitcoinUnits::formatWithUnit(unit, amount, true))
|
||||
.arg(type)
|
||||
.arg(address), CClientUIInterface::MSG_INFORMATION);
|
||||
msg, CClientUIInterface::MSG_INFORMATION);
|
||||
}
|
||||
#endif // ENABLE_WALLET
|
||||
|
||||
|
||||
Reference in New Issue
Block a user