Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-07 02:06:36 +05:00
parent 55d4f2b487
commit 988cc558ab
7 changed files with 25 additions and 7 deletions

View file

@ -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,

View file

@ -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(

View file

@ -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,
)
}

View file

@ -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,
),
)

View file

@ -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,
)

View file

@ -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 = { },
),
)

View file

@ -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(