We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0109a58 + 9eb5051 commit 9c242b4Copy full SHA for 9c242b4
app/src/main/java/to/bitkit/ui/settings/backups/ConfirmMnemonicScreen.kt
@@ -73,8 +73,10 @@ fun ConfirmMnemonicScreen(
73
pressedStates = pressedStates,
74
isComplete = isComplete,
75
onWordPress = { word, shuffledIndex ->
76
- // Find index of the last filled word
77
- val lastIndex = selectedWords.indexOfFirst { it == null } - 1
+ val firstNullIndex = selectedWords.indexOfFirst { it == null }
+ if (firstNullIndex == -1) return@ConfirmMnemonicContent
78
+
79
+ val lastIndex = firstNullIndex - 1
80
val nextIndex = if (lastIndex == -1) 0 else lastIndex + 1
81
82
// If the word is correct and pressed, do nothing
0 commit comments