commit 9b88fc93418413f395a241b9c73db21e3bcdd608
parent 952a9a627fd853150992f63cc4801dce302950d3
Author: Iván Ávalos <avalos@disroot.org>
Date: Tue, 2 Sep 2025 18:30:38 +0200
[wallet] fix #10309
Diffstat:
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawalShowInfo.kt b/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawalShowInfo.kt
@@ -126,7 +126,27 @@ fun WithdrawalShowInfo(
.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally,
) {
- if (status.isCashAcceptor) {
+ if (editableScope) AmountScopeField(
+ modifier = Modifier
+ .padding(horizontal = 16.dp)
+ .fillMaxWidth()
+ .focusRequester(focusRequester),
+ amount = selectedAmount.copy(
+ amount = selectedAmount.amount.withSpec(spec)
+ ),
+ scopes = scopes,
+ editableScope = true,
+ enabledAmount = false,
+ showShortcuts = false,
+ onAmountChanged = { amount ->
+ selectedAmount = amount
+ },
+ )
+
+ if (status.status == Error && status.error != null) {
+ WithdrawalError(status.error)
+ return
+ } else if (status.isCashAcceptor) {
WarningLabel(
label = stringResource(R.string.withdraw_cash_acceptor),
modifier = Modifier
@@ -143,7 +163,7 @@ fun WithdrawalShowInfo(
amount = selectedAmount.copy(
amount = selectedAmount.amount.withSpec(spec)),
scopes = scopes,
- editableScope = editableScope,
+ editableScope = false,
enabledAmount = status.status != TosReviewRequired,
onAmountChanged = { amount ->
selectedAmount = if (amount.scope != status.scopeInfo) {
@@ -192,11 +212,6 @@ fun WithdrawalShowInfo(
)
}
- if (status.status == Error && status.error != null) {
- WithdrawalError(status.error)
- return
- }
-
if (status.status != TosReviewRequired && !wireFee.isZero()) {
TransactionAmountComposable(
label = stringResource(R.string.amount_fee),