Updated on 2026-08-14

This commit is contained in:
Tangem 2024-10-07 15:32:56 +04:00
parent 3993e1d690
commit bb58d027c6
19 changed files with 200 additions and 19 deletions

View file

@ -7,4 +7,5 @@ dependencies {
implementation(deps.kotlin.coroutines)
implementation(deps.arrow.core)
implementation(projects.domain.balanceHiding.models)
implementation(projects.domain.wallets.models)
}

View file

@ -0,0 +1,14 @@
package com.tangem.domain.settings
import com.tangem.domain.settings.repositories.PromoSettingsRepository
import com.tangem.domain.wallets.models.UserWalletId
import kotlinx.coroutines.flow.Flow
class ShouldShowRingPromoUseCase(private val promoSettingsRepository: PromoSettingsRepository) {
operator fun invoke(userWalletId: UserWalletId): Flow<Boolean> {
return promoSettingsRepository.isReadyToShowRingPromo(userWalletId)
}
suspend fun neverToShow() = promoSettingsRepository.setNeverToShowRingPromo()
}

View file

@ -1,5 +1,6 @@
package com.tangem.domain.settings.repositories
import com.tangem.domain.wallets.models.UserWalletId
import kotlinx.coroutines.flow.Flow
interface PromoSettingsRepository {
@ -14,4 +15,8 @@ interface PromoSettingsRepository {
fun isReadyToShowWalletTravalaPromo(): Flow<Boolean>
suspend fun setNeverToShowWalletTravalaPromo()
fun isReadyToShowRingPromo(userWalletId: UserWalletId): Flow<Boolean>
suspend fun setNeverToShowRingPromo()
}