From 3565fc05bca6e55896ff7b5115e6b8021f2a9d4e Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Fri, 15 May 2020 10:10:43 -0300 Subject: [wallet] remove workarounds for fixed core bugs --- .../taler/wallet/transactions/TransactionDetailFragment.kt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt') diff --git a/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt b/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt index 9893852..fdb074d 100644 --- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt @@ -36,7 +36,6 @@ import kotlinx.android.synthetic.main.fragment_transaction_withdrawal.* import kotlinx.android.synthetic.main.fragment_transaction_withdrawal.feeView import kotlinx.android.synthetic.main.fragment_transaction_withdrawal.timeView import net.taler.common.Amount -import net.taler.common.AmountOverflowException import net.taler.common.isSafe import net.taler.common.toAbsoluteTime import net.taler.wallet.MainViewModel @@ -106,18 +105,14 @@ class TransactionDetailFragment : Fragment() { chosenAmountLabel.text = getString(R.string.amount_chosen) chosenAmountView.text = getString(R.string.amount_positive, t.amountRaw.toString()) - val fee = try { // TODO remove when fixed in wallet-core - t.amountRaw - (t.amountEffective ?: t.amountRaw) - } catch (e: AmountOverflowException) { - (t.amountEffective ?: t.amountRaw) - t.amountRaw - } + val fee = t.amountRaw - t.amountEffective feeView.text = getString(R.string.amount_negative, fee.toString()) exchangeView.text = cleanExchange(t.exchangeBaseUrl) } private fun bind(t: TransactionPayment) { amountPaidWithFeesView.text = t.amountEffective.toString() - val fee = (t.amountEffective ?: t.amountRaw) - t.amountRaw + val fee = t.amountEffective - t.amountRaw bindOrderAndFee(t.info, t.amountRaw, fee) } @@ -126,7 +121,7 @@ class TransactionDetailFragment : Fragment() { amountPaidWithFeesView.setTextColor(getColor(requireContext(), R.color.green)) amountPaidWithFeesView.text = getString(R.string.amount_positive, t.amountEffective.toString()) - val fee = t.amountRaw - (t.amountEffective ?: t.amountRaw) + val fee = t.amountRaw - t.amountEffective bindOrderAndFee(t.info, t.amountRaw, fee) } -- cgit v1.2.3