TxInfoDialog: Paid by sender

This commit is contained in:
tobtoht 2021-03-27 15:55:13 +01:00
parent d1bb4c143f
commit 22ac3af92e
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -106,8 +106,17 @@ void TransactionInfoDialog::setData(TransactionInfo* tx) {
QString direction = tx->direction() == TransactionInfo::Direction_In ? "received" : "sent"; QString direction = tx->direction() == TransactionInfo::Direction_In ? "received" : "sent";
ui->label_amount->setText(QString("Amount %1: %2").arg(direction, tx->displayAmount())); ui->label_amount->setText(QString("Amount %1: %2").arg(direction, tx->displayAmount()));
QString fee = tx->fee().isEmpty() ? "n/a" : tx->fee(); QString fee;
ui->label_fee->setText(QString("Fee: %1 XMR").arg(tx->isCoinbase() ? WalletManager::displayAmount(0) : 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));
} }