diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/model/ImportSeedPhraseUiStateBuilder.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/model/ImportSeedPhraseUiStateBuilder.kt index 7f89025442..95e7f9c2db 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/model/ImportSeedPhraseUiStateBuilder.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/im/port/model/ImportSeedPhraseUiStateBuilder.kt @@ -67,13 +67,17 @@ internal class ImportSeedPhraseUiStateBuilder( val text = st.words.text val wordsFromText = text.split(" ").filter { it.isNotBlank() }.map { it.trim() } val newWords = wordsFromText.dropLast(1) + word - val newWordsText = newWords.joinToString(" ") - st.copy( - words = TextFieldValue( - text = newWordsText, - selection = TextRange(newWordsText.length), - ), + val newWordsText = newWords.joinToString(" ").plus(" ") + val newWordsState = TextFieldValue( + text = newWordsText, + selection = TextRange(newWordsText.length), ) + st.copy( + words = newWordsState, + ).also { + launchInterceptWords(wordsField = newWordsState) + suggestNextWord(newWordsState) + } } } diff --git a/features/onboarding-v2/impl/src/main/kotlin/com/tangem/features/onboarding/v2/multiwallet/impl/child/seedphrase/model/builder/ImportSeedPhraseUiStateBuilder.kt b/features/onboarding-v2/impl/src/main/kotlin/com/tangem/features/onboarding/v2/multiwallet/impl/child/seedphrase/model/builder/ImportSeedPhraseUiStateBuilder.kt index 0fd46b3494..883e831a85 100644 --- a/features/onboarding-v2/impl/src/main/kotlin/com/tangem/features/onboarding/v2/multiwallet/impl/child/seedphrase/model/builder/ImportSeedPhraseUiStateBuilder.kt +++ b/features/onboarding-v2/impl/src/main/kotlin/com/tangem/features/onboarding/v2/multiwallet/impl/child/seedphrase/model/builder/ImportSeedPhraseUiStateBuilder.kt @@ -58,13 +58,17 @@ internal class ImportSeedPhraseUiStateBuilder( val text = st.words.text val wordsFromText = text.split(" ").filter { it.isNotBlank() }.map { it.trim() } val newWords = wordsFromText.dropLast(1) + word - val newWordsText = newWords.joinToString(" ") - st.copy( - words = TextFieldValue( - text = newWordsText, - selection = TextRange(newWordsText.length), - ), + val newWordsText = newWords.joinToString(" ").plus(" ") + val newWordsState = TextFieldValue( + text = newWordsText, + selection = TextRange(newWordsText.length), ) + st.copy( + words = newWordsState, + ).also { + launchInterceptWords(wordsField = newWordsState) + suggestNextWord(newWordsState) + } } }