Updated on 2026-08-14
This commit is contained in:
parent
8e1763dee2
commit
504a49949a
33 changed files with 408 additions and 25 deletions
|
|
@ -14,4 +14,14 @@ interface WalletsRepository {
|
|||
suspend fun isWalletWithRing(userWalletId: UserWalletId): Boolean
|
||||
|
||||
suspend fun setHasWalletsWithRing(userWalletId: UserWalletId)
|
||||
|
||||
fun seedPhraseNotificationStatus(userWalletId: UserWalletId): Flow<Boolean>
|
||||
|
||||
suspend fun notifiedSeedPhraseNotification(userWalletId: UserWalletId)
|
||||
|
||||
suspend fun confirmSeedPhraseNotification(userWalletId: UserWalletId)
|
||||
|
||||
suspend fun declineSeedPhraseNotification(userWalletId: UserWalletId)
|
||||
|
||||
suspend fun markWallet2WasCreated(userWalletId: UserWalletId)
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.tangem.domain.wallets.usecase
|
||||
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
import com.tangem.domain.wallets.repository.WalletsRepository
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
class SeedPhraseNotificationUseCase(
|
||||
private val walletsRepository: WalletsRepository,
|
||||
) {
|
||||
|
||||
operator fun invoke(userWalletId: UserWalletId): Flow<Boolean> {
|
||||
return walletsRepository.seedPhraseNotificationStatus(userWalletId)
|
||||
}
|
||||
|
||||
suspend fun notified(userWalletId: UserWalletId) {
|
||||
walletsRepository.notifiedSeedPhraseNotification(userWalletId)
|
||||
}
|
||||
|
||||
suspend fun confirm(userWalletId: UserWalletId) {
|
||||
walletsRepository.confirmSeedPhraseNotification(userWalletId)
|
||||
}
|
||||
|
||||
suspend fun decline(userWalletId: UserWalletId) {
|
||||
walletsRepository.declineSeedPhraseNotification(userWalletId)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue