commit 0a57859d92475827968a470ec9604ecd78f795cf parent 6b7f3441de6c096e35b981015862f568e98172af Author: Iván Ávalos <avalos@disroot.org> Date: Mon, 23 Nov 2026 15:38:55 +0100 [wallet] navigate to tx details on refund (fixes #12081) Diffstat:
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/wallet/src/main/java/net/taler/wallet/HandleUriScreen.kt b/wallet/src/main/java/net/taler/wallet/HandleUriScreen.kt @@ -115,8 +115,13 @@ fun HandleUriScreen( is RefundStatus.Error -> { errorInfo = status.error } - is RefundStatus.Success -> { - onNavigateBack() + is RefundStatus.Success -> scope.launch { + val transactionId = status.response.transactionId + if (model.transactionManager.selectTransaction(transactionId)) { + onNavigate(WalletDestination.TransactionPayment(), true) + } else { + onNavigateBack() + } } } } diff --git a/wallet/src/main/java/net/taler/wallet/payment/TransactionPaymentComposable.kt b/wallet/src/main/java/net/taler/wallet/payment/TransactionPaymentComposable.kt @@ -138,6 +138,14 @@ fun TransactionPaymentComposable( amountType = AmountType.Negative, ) + if (t.totalRefundEffective?.isZero() == false) { + TransactionAmountComposable( + label = stringResource(id = R.string.transaction_refund), + amount = t.totalRefundEffective.withSpec(t.amountRaw.spec), + amountType = AmountType.Positive, + ) + } + if (t.posConfirmation != null) PayTotpComposable( totpString = t.posConfirmation, enableNfc = t.posConfirmationViaNfc == true, diff --git a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt @@ -451,6 +451,7 @@ data class TransactionPayment( override val amountRaw: Amount, override val amountEffective: Amount, override val scopes: List<ScopeInfo>, + val totalRefundEffective: Amount? = null, val posConfirmation: String? = null, val posConfirmationViaNfc: Boolean? = null, ) : Transaction() {