diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/entry/AddExistingWalletStepperStateManager.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/entry/AddExistingWalletStepperStateManager.kt index 5d9dab6ae3..587c85328d 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/entry/AddExistingWalletStepperStateManager.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/entry/AddExistingWalletStepperStateManager.kt @@ -21,7 +21,7 @@ internal class AddExistingWalletStepperStateManager { is AddExistingWalletRoute.BackupCompleted -> HotWalletStepperComponent.StepperUM( currentStep = STEP_BACKUP, steps = STEPS_COUNT, - title = resourceReference(R.string.common_backup), + title = resourceReference(R.string.wallet_import_title), showBackButton = false, showSkipButton = false, showFeedbackButton = false, diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/entry/routing/AddExistingWalletChildFactory.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/entry/routing/AddExistingWalletChildFactory.kt index 5c0660cf08..78f81490ce 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/entry/routing/AddExistingWalletChildFactory.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/addexistingwallet/entry/routing/AddExistingWalletChildFactory.kt @@ -34,7 +34,7 @@ internal class AddExistingWalletChildFactory @Inject constructor( params = ManualBackupCompletedComponent.Params( userWalletId = route.userWalletId, callbacks = model.manualBackupCompletedComponentModelCallbacks, - isUpgradeFlow = false, + isImportFlow = true, ), ) is AddExistingWalletRoute.SetAccessCode -> accessCodeComponentFactory.create( diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ManualBackupCompletedComponent.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ManualBackupCompletedComponent.kt index b3fbee23df..566fb7cbbd 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ManualBackupCompletedComponent.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ManualBackupCompletedComponent.kt @@ -35,6 +35,7 @@ internal class ManualBackupCompletedComponent @AssistedInject constructor( data class Params( val userWalletId: UserWalletId, val callbacks: ModelCallbacks, - val isUpgradeFlow: Boolean, + val isImportFlow: Boolean = false, + val isUpgradeFlow: Boolean = false, ) } \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ManualBackupCompletedModel.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ManualBackupCompletedModel.kt index 67ec256e30..626e492bfa 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ManualBackupCompletedModel.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ManualBackupCompletedModel.kt @@ -3,6 +3,8 @@ package com.tangem.features.hotwallet.manualbackup.completed import com.tangem.core.decompose.di.ModelScoped import com.tangem.core.decompose.model.Model import com.tangem.core.decompose.model.ParamsContainer +import com.tangem.core.res.R +import com.tangem.core.ui.extensions.resourceReference import com.tangem.features.hotwallet.manualbackup.completed.entity.ManualBackupCompletedUM import com.tangem.utils.coroutines.CoroutineDispatcherProvider import kotlinx.coroutines.flow.MutableStateFlow @@ -28,6 +30,12 @@ internal class ManualBackupCompletedModel @Inject constructor( params.callbacks.onContinueClick(params.userWalletId) } }, + title = if (params.isImportFlow) { + resourceReference(R.string.wallet_import_success_title) + } else { + resourceReference(R.string.backup_complete_title) + }, + description = resourceReference(R.string.backup_complete_description), isLoading = false, ), ) diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/entity/ManualBackupCompletedUM.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/entity/ManualBackupCompletedUM.kt index d647fa285c..8ba7b22a4e 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/entity/ManualBackupCompletedUM.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/entity/ManualBackupCompletedUM.kt @@ -1,6 +1,10 @@ package com.tangem.features.hotwallet.manualbackup.completed.entity +import com.tangem.core.ui.extensions.TextReference + internal data class ManualBackupCompletedUM( + val title: TextReference, + val description: TextReference, val onContinueClick: () -> Unit, val isLoading: Boolean, ) \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ui/ManualBackupCompletedContent.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ui/ManualBackupCompletedContent.kt index b3b0da92e4..4809adea2e 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ui/ManualBackupCompletedContent.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/manualbackup/completed/ui/ManualBackupCompletedContent.kt @@ -16,6 +16,8 @@ import com.tangem.core.ui.components.PrimaryButton import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.res.TangemThemePreview import com.tangem.core.ui.R +import com.tangem.core.ui.extensions.resolveReference +import com.tangem.core.ui.extensions.resourceReference import com.tangem.core.ui.extensions.stringResourceSafe import com.tangem.features.hotwallet.manualbackup.completed.entity.ManualBackupCompletedUM @@ -43,7 +45,7 @@ internal fun ManualBackupCompletedContent(state: ManualBackupCompletedUM, modifi top = 20.dp, end = 48.dp, ), - text = stringResourceSafe(R.string.backup_complete_title), + text = state.title.resolveReference(), style = TangemTheme.typography.h2, color = TangemTheme.colors.text.primary1, textAlign = TextAlign.Center, @@ -73,11 +75,13 @@ internal fun ManualBackupCompletedContent(state: ManualBackupCompletedUM, modifi @Preview(showBackground = true, widthDp = 360) @Preview(showBackground = true, widthDp = 360, uiMode = Configuration.UI_MODE_NIGHT_YES) @Composable -private fun PreviewManualBackupCompletedContentRegular() { +private fun PreviewManualBackupCompletedContentBackup() { TangemThemePreview { ManualBackupCompletedContent( state = ManualBackupCompletedUM( isLoading = false, + title = resourceReference(R.string.backup_complete_title), + description = resourceReference(R.string.backup_complete_description), onContinueClick = { }, ), ) @@ -87,11 +91,13 @@ private fun PreviewManualBackupCompletedContentRegular() { @Preview(showBackground = true, widthDp = 360) @Preview(showBackground = true, widthDp = 360, uiMode = Configuration.UI_MODE_NIGHT_YES) @Composable -private fun PreviewManualBackupCompletedContentUpgrade() { +private fun PreviewManualBackupCompletedContentImport() { TangemThemePreview { ManualBackupCompletedContent( state = ManualBackupCompletedUM( isLoading = false, + title = resourceReference(R.string.wallet_import_success_title), + description = resourceReference(R.string.backup_complete_description), onContinueClick = { }, ), ) diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/walletactivation/entry/routing/WalletActivationChildFactory.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/walletactivation/entry/routing/WalletActivationChildFactory.kt index 6cdbce4153..77684cecdb 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/walletactivation/entry/routing/WalletActivationChildFactory.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/walletactivation/entry/routing/WalletActivationChildFactory.kt @@ -50,7 +50,6 @@ internal class WalletActivationChildFactory @Inject constructor( params = ManualBackupCompletedComponent.Params( userWalletId = model.params.userWalletId, callbacks = model.manualBackupCompletedModelCallbacks, - isUpgradeFlow = false, ), ) is WalletActivationRoute.SetAccessCode -> accessCodeComponentFactory.create(