From 2c90ae7209cd1186a9cf65c3d9c3dd86b8836f2b Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 22 Sep 2025 09:56:57 +0500 Subject: [PATCH] Updated on 2026-08-14 --- .../port/model/ImportSeedPhraseUiStateBuilder.kt | 16 ++++++++++------ .../builder/ImportSeedPhraseUiStateBuilder.kt | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) 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) + } } }