@@ -24,6 +24,7 @@ import androidx.compose.foundation.layout.width
2424import androidx.compose.foundation.lazy.LazyColumn
2525import androidx.compose.foundation.lazy.itemsIndexed
2626import androidx.compose.foundation.shape.RoundedCornerShape
27+ import androidx.compose.foundation.text.KeyboardOptions
2728import androidx.compose.material3.AlertDialog
2829import androidx.compose.material3.BottomSheetScaffold
2930import androidx.compose.material3.BottomSheetScaffoldState
@@ -53,6 +54,7 @@ import androidx.compose.ui.graphics.Color
5354import androidx.compose.ui.platform.LocalContext
5455import androidx.compose.ui.semantics.Role
5556import androidx.compose.ui.text.TextStyle
57+ import androidx.compose.ui.text.input.KeyboardType
5658import androidx.compose.ui.text.style.TextAlign
5759import androidx.compose.ui.unit.dp
5860import androidx.compose.ui.unit.sp
@@ -351,9 +353,11 @@ private fun TransactionAmountInput(recipientList: MutableList<Recipient>, transa
351353 .padding(vertical = 8 .dp)
352354 .weight(0.5f ),
353355 value = amount.value,
354- onValueChange = {
355- amount.value = it
356- recipientList[index].amount = it.toULong()
356+ onValueChange = { newValue ->
357+ if (newValue.all { it.isDigit() }) {
358+ amount.value = newValue
359+ recipientList[index].amount = newValue.toULongOrNull() ? : 0 .toULong()
360+ }
357361 },
358362 label = {
359363 when (transactionType) {
@@ -372,6 +376,7 @@ private fun TransactionAmountInput(recipientList: MutableList<Recipient>, transa
372376 }
373377 }
374378 },
379+ keyboardOptions = KeyboardOptions (keyboardType = KeyboardType .Number ),
375380 singleLine = true ,
376381 textStyle = TextStyle (color = DevkitWalletColors .white),
377382 colors = OutlinedTextFieldDefaults .colors(
0 commit comments