Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.BottomSheetScaffold
import androidx.compose.material3.BottomSheetScaffoldState
Expand Down Expand Up @@ -53,6 +54,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
Expand Down Expand Up @@ -351,9 +353,11 @@ private fun TransactionAmountInput(recipientList: MutableList<Recipient>, transa
.padding(vertical = 8.dp)
.weight(0.5f),
value = amount.value,
onValueChange = {
amount.value = it
recipientList[index].amount = it.toULong()
onValueChange = { newValue ->
if (newValue.all { it.isDigit() }) {
amount.value = newValue
recipientList[index].amount = newValue.toULongOrNull() ?: 0.toULong()
}
},
label = {
when (transactionType) {
Expand All @@ -372,6 +376,7 @@ private fun TransactionAmountInput(recipientList: MutableList<Recipient>, transa
}
}
},
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
singleLine = true,
textStyle = TextStyle(color = DevkitWalletColors.white),
colors = OutlinedTextFieldDefaults.colors(
Expand Down
Loading