summaryrefslogtreecommitdiff
path: root/wallet/src/main/java/net/taler/wallet/compose/AmountInputField.kt
diff options
context:
space:
mode:
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/compose/AmountInputField.kt')
-rw-r--r--wallet/src/main/java/net/taler/wallet/compose/AmountInputField.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/compose/AmountInputField.kt b/wallet/src/main/java/net/taler/wallet/compose/AmountInputField.kt
index 077c89a..3d1d284 100644
--- a/wallet/src/main/java/net/taler/wallet/compose/AmountInputField.kt
+++ b/wallet/src/main/java/net/taler/wallet/compose/AmountInputField.kt
@@ -40,6 +40,8 @@ import kotlin.math.max
import kotlin.math.pow
import kotlin.math.roundToLong
+const val DEFAULT_INPUT_DECIMALS = 2
+
@Composable
fun AmountInputField(
value: String,
@@ -50,7 +52,7 @@ fun AmountInputField(
isError: Boolean = false,
keyboardActions: KeyboardActions = KeyboardActions.Default,
decimalFormatSymbols: DecimalFormatSymbols = DecimalFormat().decimalFormatSymbols,
- numberOfDecimals: Int = 2,
+ numberOfDecimals: Int = DEFAULT_INPUT_DECIMALS,
) {
var amountInput by remember { mutableStateOf(value) }