Merge pull request 'TxInfoDialog: Paid by sender' (#350) from tobtoht/feather:info_fee into master

Reviewed-on: https://git.featherwallet.org/feather/feather/pulls/350
This commit is contained in:
tobtoht 2021-03-27 14:56:37 +00:00
commit 0dcc58a35c

View file

@ -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));
}