taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit 77d943bd7396f825c118d0beb2d72b578b718e0e
parent 3700c0886ce3b3e495a43c637e3f1d34c4799284
Author: Iván Ávalos <avalos@disroot.org>
Date:   Tue, 20 May 2025 20:47:51 +0200

[wallet] proper strings for KYC and amount labels

Diffstat:
Mwallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt | 7++++++-
Mwallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt | 7++++++-
Mwallet/src/main/res/values/strings.xml | 1+
3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt b/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPullCredit.kt @@ -38,6 +38,7 @@ import net.taler.wallet.transactions.TransactionAction.Retry import net.taler.wallet.transactions.TransactionAction.Suspend import net.taler.wallet.transactions.TransactionAmountComposable import net.taler.wallet.transactions.TransactionInfoComposable +import net.taler.wallet.transactions.TransactionMajorState.Done import net.taler.wallet.transactions.TransactionMajorState.Pending import net.taler.wallet.transactions.TransactionMinorState.CreatePurse import net.taler.wallet.transactions.TransactionMinorState.Ready @@ -76,7 +77,11 @@ fun ColumnScope.TransactionPeerPullCreditComposable( } TransactionAmountComposable( - label = stringResource(id = R.string.amount_received), + label = if (t.txState.major == Done) { + stringResource(id = R.string.amount_received) + } else { + stringResource(id = R.string.amount_receive) + }, amount = t.amountEffective.withSpec(spec), amountType = AmountType.Positive, ) diff --git a/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt b/wallet/src/main/java/net/taler/wallet/peer/TransactionPeerPushDebit.kt @@ -48,6 +48,7 @@ import net.taler.wallet.transactions.TransactionAction.Retry import net.taler.wallet.transactions.TransactionAction.Suspend import net.taler.wallet.transactions.TransactionAmountComposable import net.taler.wallet.transactions.TransactionInfoComposable +import net.taler.wallet.transactions.TransactionMajorState.Done import net.taler.wallet.transactions.TransactionMajorState.Pending import net.taler.wallet.transactions.TransactionMinorState.CreatePurse import net.taler.wallet.transactions.TransactionMinorState.MergeKycRequired @@ -81,7 +82,11 @@ fun ColumnScope.TransactionPeerPushDebitComposable(t: TransactionPeerPushDebit, } TransactionAmountComposable( - label = stringResource(id = R.string.transaction_paid), + label = if (t.txState.major == Done) { + stringResource(id = R.string.amount_sent) + } else { + stringResource(R.string.amount_send) + }, amount = t.amountEffective.withSpec(spec), amountType = AmountType.Negative, ) diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml @@ -158,6 +158,7 @@ GNU Taler is immune against many types of fraud, such as phishing of credit card <string name="transaction_state_pending_bank">Waiting for authorization in the bank</string> <string name="transaction_state_pending_kyc_bank">This transaction would exceed the withdrawal limit set by your bank, in order to continue you must complete KYC verification</string> <string name="transaction_state_pending_kyc_balance">This transaction would exceed the limit of balance in your wallet set by the provider, in order to continue you must complete KYC verification</string> + <string name="transaction_state_pending_kyc_merge">This transaction would exceed the transfer limit set by the provider, in order to continue you must complete KYC verification</string> <string name="transaction_state_suspended">This transaction is suspended</string> <string name="transactions_abort">Abort</string> <string name="transactions_abort_dialog_message">Are you sure you want to abort this transaction? Funds still in transit might get lost.</string>