Qt: When multiple wallets are used, include in notifications the name

This commit is contained in:
Jonas Schnelli
2018-03-06 12:26:40 +08:00
parent d1ec34a761
commit 12d8d2681e
6 changed files with 28 additions and 7 deletions

View File

@@ -1000,12 +1000,15 @@ void BitcoinGUI::showEvent(QShowEvent *event)
}
#ifdef ENABLE_WALLET
void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label)
void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label, const QString& walletName)
{
// 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);
tr("Amount: %1\n").arg(BitcoinUnits::formatWithUnit(unit, amount, true));
if (WalletModel::isMultiwallet() && !walletName.isEmpty()) {
msg += tr("Wallet: %1\n").arg(walletName);
}
msg += tr("Type: %1\n").arg(type);
if (!label.isEmpty())
msg += tr("Label: %1\n").arg(label);
else if (!address.isEmpty())