diff options
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt')
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt b/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt index 20f8280..9bfeda6 100644 --- a/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt +++ b/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt @@ -81,23 +81,25 @@ fun TransactionWithdrawalComposable( ActionButton(tx = t, listener = actionListener) - TransactionAmountComposable( - label = stringResource(R.string.amount_chosen), - amount = t.amountRaw.withSpec(spec), - amountType = AmountType.Neutral, - ) + if (t.amountRaw != t.amountEffective) { + TransactionAmountComposable( + label = stringResource(R.string.amount_chosen), + amount = t.amountRaw.withSpec(spec), + amountType = AmountType.Neutral, + ) + } - val fee = t.amountRaw - t.amountEffective - if (!fee.isZero()) { + if (t.amountRaw > t.amountEffective) { + val fee = t.amountRaw - t.amountEffective TransactionAmountComposable( - label = stringResource(id = R.string.withdraw_fees), + label = stringResource(id = R.string.amount_fee), amount = fee.withSpec(spec), amountType = AmountType.Negative, ) } TransactionAmountComposable( - label = stringResource(id = R.string.withdraw_total), + label = stringResource(id = R.string.amount_total), amount = t.amountEffective.withSpec(spec), amountType = AmountType.Positive, ) |