fix incomingTransaction notifications

Signed-off-by: pasta <pasta@dashboost.org>
This commit is contained in:
pasta 2020-07-12 00:45:00 -05:00
parent 2af7ce84fb
commit a670374937
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984
2 changed files with 4 additions and 3 deletions

View File

@ -1339,7 +1339,7 @@ void BitcoinGUI::showEvent(QShowEvent *event)
void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label, const QString& walletName)
{
IncomingTransactionMessage itx = {
date, unit, amount, type, address, label
date, unit, amount, type, address, label, walletName
};
incomingTransactions.emplace_back(itx);
@ -1406,8 +1406,8 @@ void BitcoinGUI::showIncomingTransactions()
// On new transaction, make an info balloon
QString msg = tr("Date: %1\n").arg(itx.date) +
tr("Amount: %1\n").arg(BitcoinUnits::formatWithUnit(itx.unit, itx.amount, true));
if (WalletModel::isMultiwallet() && !walletName.isEmpty()) {
msg += tr("Wallet: %1\n").arg(walletName);
if (WalletModel::isMultiwallet() && !itx.walletName.isEmpty()) {
msg += tr("Wallet: %1\n").arg(itx.walletName);
}
msg += tr("Type: %1\n").arg(itx.type);
if (!itx.label.isEmpty())

View File

@ -159,6 +159,7 @@ private:
QString type;
QString address;
QString label;
QString walletName;
};
std::list<IncomingTransactionMessage> incomingTransactions;
QTimer* incomingTransactionsTimer;