aboutsummaryrefslogtreecommitdiff
path: root/wallet/src
diff options
context:
space:
mode:
Diffstat (limited to 'wallet/src')
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt14
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt2
2 files changed, 14 insertions, 2 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 6b58824..f78d98f 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt
@@ -73,9 +73,10 @@ class TransactionDetailFragment : Fragment() {
is TransactionWithdrawal -> bind(e)
is TransactionPayment -> bind(e)
is TransactionRefund -> bind(e)
+ is TransactionRefresh -> bind(e)
else -> Toast.makeText(
requireContext(),
- "event ${e.javaClass} not implement",
+ "Transaction ${e.javaClass.simpleName} not implemented.",
LENGTH_LONG
).show()
}
@@ -125,6 +126,17 @@ class TransactionDetailFragment : Fragment() {
bindOrderAndFee(t.info, t.amountRaw, fee)
}
+ private fun bind(t: TransactionRefresh) {
+ effectiveAmountLabel.visibility = GONE
+ effectiveAmountView.visibility = GONE
+ confirmWithdrawalButton.visibility = GONE
+ chosenAmountLabel.visibility = GONE
+ chosenAmountView.visibility = GONE
+ val fee = t.amountEffective
+ feeView.text = getString(R.string.amount_negative, fee.toString())
+ exchangeView.text = cleanExchange(t.exchangeBaseUrl)
+ }
+
private fun bindOrderAndFee(info: TransactionInfo, raw: Amount, fee: Amount) {
orderAmountView.text = raw.toString()
feeView.text = getString(R.string.amount_negative, fee.toString())
diff --git a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
index 8567259..27384d8 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt
@@ -190,7 +190,7 @@ class TransactionRefresh(
amountEffective: Amount
) : Transaction(transactionId, timestamp, pending, error, amountRaw, amountEffective) {
override val icon = R.drawable.transaction_refresh
- override val detailPageLayout = R.layout.fragment_transaction_payment
+ override val detailPageLayout = R.layout.fragment_transaction_withdrawal
override val amountType = AmountType.Negative
override fun getTitle(context: Context): String {
return context.getString(R.string.transaction_refresh)