Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-17 10:47:22 +03:00
parent 134fd9e8d4
commit 2746ee308a

View file

@ -117,7 +117,13 @@ internal class WalletModel @Inject constructor(
init {
analyticsEventsHandler.send(WalletScreenAnalyticsEvent.MainScreen.ScreenOpened)
suggestToEnableBiometrics()
screenLifecycleProvider.isBackgroundState
.onEach { isBackground ->
if (isBackground.not()) {
suggestToEnableBiometrics()
}
}.launchIn(modelScope)
suggestToOpenMarkets()
maybeMigrateNames()
@ -162,15 +168,13 @@ internal class WalletModel @Inject constructor(
walletScreenContentLoader.cancelAll()
}
private fun suggestToEnableBiometrics() {
modelScope.launch(dispatchers.main) {
withContext(dispatchers.io) { delay(timeMillis = 1_800) }
private suspend fun suggestToEnableBiometrics() {
if (shouldShowAskBiometryBottomSheet()) {
delay(timeMillis = 1_800)
if (shouldShowAskBiometryBottomSheet()) {
innerWalletRouter.dialogNavigation.activate(
configuration = WalletDialogConfig.AskForBiometry,
)
}
innerWalletRouter.dialogNavigation.activate(
configuration = WalletDialogConfig.AskForBiometry,
)
}
}