Updated on 2026-08-14
This commit is contained in:
parent
e2791d9b35
commit
afcde269ce
24 changed files with 243 additions and 131 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
@ -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()
|
||||
}
|
||||
|
|
@ -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()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue