Updated on 2026-08-14

This commit is contained in:
Tangem 2025-07-30 23:45:04 +04:00
parent 2cbfdb5c66
commit be687c23a0
2 changed files with 5 additions and 5 deletions

View file

@ -1,11 +1,11 @@
package com.tangem.domain.wallets.usecase
import com.tangem.domain.wallets.legacy.UserWalletsListManager
import com.tangem.sdk.api.TangemSdkManager
import javax.inject.Inject
class GetIsBiometricsEnabledUseCase @Inject constructor(
private val userWalletsListManager: UserWalletsListManager,
private val tangemSdkManager: TangemSdkManager,
) {
operator fun invoke(): Boolean = userWalletsListManager as? UserWalletsListManager.Lockable != null
operator fun invoke(): Boolean = runCatching(tangemSdkManager::needEnrollBiometrics).getOrNull() ?: false
}

View file

@ -207,10 +207,10 @@ internal class WalletModel @Inject constructor(
modelScope.launch {
val shouldAskPermission = shouldAskPermissionUseCase(PUSH_PERMISSION)
val afterUpdate = notificationsRepository.shouldShowSubscribeOnNotificationsAfterUpdate()
val isBiometryIsEnabled = getIsBiometryIsEnabledUseCase()
val isBiometricsEnabled = getIsBiometryIsEnabledUseCase()
val isHuaweiDevice = getIsHuaweiDeviceWithoutGoogleServicesUseCase()
val shouldShowBottomSheet = shouldAskPermission || afterUpdate
if (!isBiometryIsEnabled) return@launch
if (!isBiometricsEnabled) return@launch
if (isHuaweiDevice) return@launch
if (!shouldShowBottomSheet) return@launch