Updated on 2026-08-14

This commit is contained in:
Tangem 2026-04-21 11:50:28 +01:00
parent d30f231520
commit 333640b3a7
22 changed files with 393 additions and 103 deletions

View file

@ -237,7 +237,10 @@ internal class CreateWalletStartModel @Inject constructor(
ifRight = {
setLoading(false)
val route = if (onboardingV2FeatureToggles.isAddressSyncEnabled) {
AppRoute.AddressSync
AppRoute.Onboarding(
scanResponse = scanResponse,
mode = AppRoute.Onboarding.Mode.AddressSync
)
} else {
AppRoute.Wallet
}

View file

@ -531,7 +531,17 @@ internal class CreateWalletStartModelTest {
model.uiState.value.onScanClick.invoke()
advanceUntilIdle()
verify { appRouter.replaceAll(routes = arrayOf(AppRoute.AddressSync), onComplete = any()) }
verify {
appRouter.replaceAll(
routes = arrayOf(
AppRoute.Onboarding(
scanResponse = testScanResponse,
mode = AppRoute.Onboarding.Mode.AddressSync,
)
),
onComplete = any()
)
}
}
@Test
@ -573,9 +583,9 @@ internal class CreateWalletStartModelTest {
)
assert(state.imageResId == R.drawable.img_hardware_wallet)
assert(state.shouldShowScanSecondaryButton)
assert(state.primaryButtonText == resourceReference(R.string.details_buy_wallet),)
assert(state.otherMethodTitle == resourceReference(R.string.welcome_create_wallet_mobile_title),)
assert(state.otherMethodDescription == null,)
assert(state.primaryButtonText == resourceReference(R.string.details_buy_wallet))
assert(state.otherMethodTitle == resourceReference(R.string.welcome_create_wallet_mobile_title))
assert(state.otherMethodDescription == null)
assert(state.isScanInProgress.not())
}