From 22ac3af92e18f89fa6071f132103a5905fc5f4d2 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sat, 27 Mar 2021 15:55:13 +0100 Subject: [PATCH] TxInfoDialog: Paid by sender --- src/dialog/transactioninfodialog.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/dialog/transactioninfodialog.cpp b/src/dialog/transactioninfodialog.cpp index 2de9dad..048b3fb 100644 --- a/src/dialog/transactioninfodialog.cpp +++ b/src/dialog/transactioninfodialog.cpp @@ -106,8 +106,17 @@ void TransactionInfoDialog::setData(TransactionInfo* tx) { QString direction = tx->direction() == TransactionInfo::Direction_In ? "received" : "sent"; ui->label_amount->setText(QString("Amount %1: %2").arg(direction, tx->displayAmount())); - QString fee = tx->fee().isEmpty() ? "n/a" : tx->fee(); - ui->label_fee->setText(QString("Fee: %1 XMR").arg(tx->isCoinbase() ? WalletManager::displayAmount(0) : fee)); + QString fee; + if (tx->isCoinbase()) + fee = "Not applicable"; + else if (tx->direction() == TransactionInfo::Direction_In) + fee = "Paid by sender"; + else if (tx->fee().isEmpty()) + fee = "N/A"; + else + fee = QString("%1 XMR").arg(tx->fee()); + + ui->label_fee->setText(QString("Fee: %1").arg(fee)); }