diff options
author | Torsten Grote <t@grobox.de> | 2020-05-15 10:10:43 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-05-15 14:26:43 -0300 |
commit | 3565fc05bca6e55896ff7b5115e6b8021f2a9d4e (patch) | |
tree | ad31de3bf00b9e0d73a8041ace54414924575198 /wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt | |
parent | dfc0db1432b181723e20efc01d46335ffd53115d (diff) | |
download | taler-android-3565fc05bca6e55896ff7b5115e6b8021f2a9d4e.tar.gz taler-android-3565fc05bca6e55896ff7b5115e6b8021f2a9d4e.tar.bz2 taler-android-3565fc05bca6e55896ff7b5115e6b8021f2a9d4e.zip |
[wallet] remove workarounds for fixed core bugs
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt')
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt | 11 |
1 files changed, 3 insertions, 8 deletions
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) } |