Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-11 16:16:44 +04:00
parent 61f2412cb5
commit e3ec61bc4b
11 changed files with 509 additions and 8 deletions

View file

@ -19,6 +19,9 @@ internal class RuntimeUserWalletsStore(
override val userWallets: Flow<List<UserWallet>>
get() = userWalletsListManager.userWallets
override val userWalletsSync: List<UserWallet>
get() = userWalletsListManager.userWalletsSync
override fun getSyncOrNull(key: UserWalletId): UserWallet? {
return userWalletsListManager.userWalletsSync.firstOrNull { it.walletId == key }
}

View file

@ -3,9 +3,9 @@ package com.tangem.tap.data
import com.tangem.common.CompletionResult
import com.tangem.common.catching
import com.tangem.datasource.local.userwallet.UserWalletsStore
import com.tangem.domain.core.wallets.UserWalletsListRepository
import com.tangem.domain.models.wallet.UserWallet
import com.tangem.domain.models.wallet.UserWalletId
import com.tangem.domain.core.wallets.UserWalletsListRepository
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
@ -24,6 +24,9 @@ class UserWalletsStoreRepositoryProxy(
}
}
override val userWalletsSync: List<UserWallet>
get() = userWalletsListRepository.userWallets.value.orEmpty()
override fun getSyncOrNull(key: UserWalletId): UserWallet? {
return userWalletsListRepository.userWallets.value?.find { it.walletId == key }
}

View file

@ -1,5 +1,6 @@
package com.tangem.tap.di.domain
import com.tangem.domain.account.featuretoggle.AccountsFeatureToggles
import com.tangem.domain.account.repository.AccountsCRUDRepository
import com.tangem.domain.account.usecase.*
import dagger.Module
@ -49,4 +50,16 @@ internal object AccountDomainModule {
): GetUnoccupiedAccountIndexUseCase {
return GetUnoccupiedAccountIndexUseCase(crudRepository = accountsCRUDRepository)
}
@Provides
@Singleton
fun provideIsAccountsModeEnabledUseCase(
accountsCRUDRepository: AccountsCRUDRepository,
accountsFeatureToggles: AccountsFeatureToggles,
): IsAccountsModeEnabledUseCase {
return IsAccountsModeEnabledUseCase(
crudRepository = accountsCRUDRepository,
accountsFeatureToggles = accountsFeatureToggles,
)
}
}