mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 03:59:29 +00:00
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:
commit
0dcc58a35c
1 changed files with 11 additions and 2 deletions
|
@ -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));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue