Updated on 2026-08-14

This commit is contained in:
Tangem 2023-10-10 14:50:19 +08:00
parent e2791d9b35
commit afcde269ce
24 changed files with 243 additions and 131 deletions

View file

@ -1,6 +1,14 @@
package com.tangem.domain.wallets.repository
import kotlinx.coroutines.flow.Flow
interface WalletsRepository {
suspend fun shouldSaveUserWallets(): Boolean
suspend fun initialize()
suspend fun shouldSaveUserWalletsSync(): Boolean
fun shouldSaveUserWallets(): Flow<Boolean>
suspend fun saveShouldSaveUserWallets(item: Boolean)
}

View file

@ -0,0 +1,8 @@
package com.tangem.domain.wallets.usecase
import com.tangem.domain.wallets.repository.WalletsRepository
class ShouldSaveUserWalletsSyncUseCase(private val walletsRepository: WalletsRepository) {
suspend operator fun invoke(): Boolean = walletsRepository.shouldSaveUserWalletsSync()
}

View file

@ -1,8 +1,9 @@
package com.tangem.domain.wallets.usecase
import com.tangem.domain.wallets.repository.WalletsRepository
import kotlinx.coroutines.flow.Flow
class ShouldSaveUserWalletsUseCase(private val walletsRepository: WalletsRepository) {
suspend operator fun invoke(): Boolean = walletsRepository.shouldSaveUserWallets()
operator fun invoke(): Flow<Boolean> = walletsRepository.shouldSaveUserWallets()
}