Updated on 2026-08-14

This commit is contained in:
Tangem 2026-02-09 13:33:03 +03:00
parent eaf0507b89
commit c5edd9f13d
2 changed files with 13 additions and 3 deletions

View file

@ -30,10 +30,14 @@ class RootDetectedWarningComponent @AssistedInject constructor(
private val isShown = instanceKeeper.getOrCreateSimple { MutableStateFlow(false) }
suspend fun shouldShowWarning(): Boolean {
return settingsRepository.isRootDetectedWarningShown().not() && securityInfoProvider.isSecurityExposed()
}
suspend fun tryToShowWarningAndWaitContinuation() {
if (isShown.value) return
if (settingsRepository.isRootDetectedWarningShown().not() && securityInfoProvider.isSecurityExposed()) {
if (shouldShowWarning()) {
isShown.value = true
}