summaryrefslogtreecommitdiff
path: root/wallet/src/main/java/net/taler/wallet/withdraw
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2024-02-12 18:47:53 -0600
committerTorsten Grote <t@grobox.de>2024-03-27 14:26:41 -0300
commitc86ae12e55c227e285252271c90b56f35f38858e (patch)
tree03a33886e08d8211b061c76b85fbcd954d967d08 /wallet/src/main/java/net/taler/wallet/withdraw
parent1e9ee99cb07c595132fa96935e3f2b7c88dd586a (diff)
downloadtaler-android-c86ae12e55c227e285252271c90b56f35f38858e.tar.gz
taler-android-c86ae12e55c227e285252271c90b56f35f38858e.tar.bz2
taler-android-c86ae12e55c227e285252271c90b56f35f38858e.zip
[wallet] DD51: enrich some tx amounts with currencySpecification
bug 0008329 (cherry picked from commit 021e4443bae33abbdc9de21f2708e633e99ca055)
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/withdraw')
-rw-r--r--wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt b/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt
index 7e8f94f..5155b5b 100644
--- a/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt
+++ b/wallet/src/main/java/net/taler/wallet/withdraw/TransactionWithdrawalComposable.kt
@@ -61,6 +61,7 @@ import net.taler.wallet.transactions.WithdrawalExchangeAccountDetails
fun TransactionWithdrawalComposable(
t: TransactionWithdrawal,
devMode: Boolean,
+ spec: CurrencySpecification?,
actionListener: ActionListener,
onTransition: (t: TransactionAction) -> Unit,
) {
@@ -82,7 +83,7 @@ fun TransactionWithdrawalComposable(
TransactionAmountComposable(
label = stringResource(R.string.amount_chosen),
- amount = t.amountRaw,
+ amount = t.amountRaw.withSpec(spec),
amountType = AmountType.Neutral,
)
@@ -90,14 +91,14 @@ fun TransactionWithdrawalComposable(
if (!fee.isZero()) {
TransactionAmountComposable(
label = stringResource(id = R.string.withdraw_fees),
- amount = fee,
+ amount = fee.withSpec(spec),
amountType = AmountType.Negative,
)
}
TransactionAmountComposable(
label = stringResource(id = R.string.withdraw_total),
- amount = t.amountEffective,
+ amount = t.amountEffective.withSpec(spec),
amountType = AmountType.Positive,
)
@@ -148,6 +149,6 @@ fun TransactionWithdrawalComposablePreview() {
}
Surface {
- TransactionWithdrawalComposable(t, true, listener) {}
+ TransactionWithdrawalComposable(t, true, null, listener) {}
}
}