Updated on 2026-08-14
This commit is contained in:
parent
4de7d3ba74
commit
bf0a66f183
25 changed files with 61 additions and 70 deletions
|
|
@ -1,14 +1,13 @@
|
|||
package com.tangem.data.networks.di
|
||||
|
||||
import android.content.Context
|
||||
import androidx.datastore.core.DataStore
|
||||
import androidx.datastore.core.DataStoreFactory
|
||||
import androidx.datastore.dataStoreFile
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.tangem.data.common.currency.CardCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.repository.DefaultNetworksRepository
|
||||
import com.tangem.data.networks.store.DefaultNetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.DefaultNetworksStatusesStore
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.datasource.di.NetworkMoshi
|
||||
import com.tangem.datasource.local.datastore.RuntimeSharedStore
|
||||
import com.tangem.datasource.local.network.entity.NetworkStatusDM
|
||||
|
|
@ -31,33 +30,24 @@ import javax.inject.Singleton
|
|||
@InstallIn(SingletonComponent::class)
|
||||
internal object NetworkDataModule {
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun providePersistenceNetworksStatusesStore(
|
||||
@Singleton
|
||||
fun provideNetworksStatusesStore(
|
||||
@NetworkMoshi moshi: Moshi,
|
||||
@ApplicationContext context: Context,
|
||||
dispatchers: CoroutineDispatcherProvider,
|
||||
): DataStore<Map<String, Set<NetworkStatusDM>>> {
|
||||
return DataStoreFactory.create(
|
||||
serializer = MoshiDataStoreSerializer(
|
||||
moshi = moshi,
|
||||
types = mapWithStringKeyTypes(valueTypes = setTypes<NetworkStatusDM>()),
|
||||
defaultValue = emptyMap(),
|
||||
),
|
||||
produceFile = { context.dataStoreFile(fileName = "networks_statuses") },
|
||||
scope = CoroutineScope(context = dispatchers.io + SupervisorJob()),
|
||||
)
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideNetworksStatusesStoreV2(
|
||||
persistenceNetworksStatusesStore: DataStore<Map<String, Set<NetworkStatusDM>>>,
|
||||
dispatchers: CoroutineDispatcherProvider,
|
||||
): NetworksStatusesStoreV2 {
|
||||
return DefaultNetworksStatusesStoreV2(
|
||||
): NetworksStatusesStore {
|
||||
return DefaultNetworksStatusesStore(
|
||||
runtimeStore = RuntimeSharedStore(),
|
||||
persistenceDataStore = persistenceNetworksStatusesStore,
|
||||
persistenceDataStore = DataStoreFactory.create(
|
||||
serializer = MoshiDataStoreSerializer(
|
||||
moshi = moshi,
|
||||
types = mapWithStringKeyTypes(valueTypes = setTypes<NetworkStatusDM>()),
|
||||
defaultValue = emptyMap(),
|
||||
),
|
||||
produceFile = { context.dataStoreFile(fileName = "networks_statuses") },
|
||||
scope = CoroutineScope(context = dispatchers.io + SupervisorJob()),
|
||||
),
|
||||
dispatchers = dispatchers,
|
||||
)
|
||||
}
|
||||
|
|
@ -67,13 +57,13 @@ internal object NetworkDataModule {
|
|||
fun provideNetworkRepository(
|
||||
cardCryptoCurrencyFactory: CardCryptoCurrencyFactory,
|
||||
walletManagersFacade: WalletManagersFacade,
|
||||
networksStatusesStoreV2: NetworksStatusesStoreV2,
|
||||
networksStatusesStore: NetworksStatusesStore,
|
||||
dispatchers: CoroutineDispatcherProvider,
|
||||
): NetworksRepository {
|
||||
return DefaultNetworksRepository(
|
||||
cardCryptoCurrencyFactory = cardCryptoCurrencyFactory,
|
||||
walletManagersFacade = walletManagersFacade,
|
||||
networksStatusesStore = networksStatusesStoreV2,
|
||||
networksStatusesStore = networksStatusesStore,
|
||||
dispatchers = dispatchers,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.tangem.data.networks.fetcher
|
||||
|
||||
import arrow.core.Either
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.data.networks.store.setSourceAsOnlyCache
|
||||
import com.tangem.data.networks.store.storeStatus
|
||||
import com.tangem.data.networks.utils.NetworkStatusFactory
|
||||
|
|
@ -26,7 +26,7 @@ import javax.inject.Inject
|
|||
*/
|
||||
internal class CommonNetworkStatusFetcher @Inject constructor(
|
||||
private val walletManagersFacade: WalletManagersFacade,
|
||||
private val networksStatusesStore: NetworksStatusesStoreV2,
|
||||
private val networksStatusesStore: NetworksStatusesStore,
|
||||
private val dispatchers: CoroutineDispatcherProvider,
|
||||
) {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import arrow.core.raise.catch
|
|||
import arrow.core.raise.ensure
|
||||
import com.tangem.data.common.currency.CardCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.fetcher.CommonNetworkStatusFetcher
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.data.networks.store.setSourceAsCache
|
||||
import com.tangem.data.networks.store.setSourceAsOnlyCache
|
||||
import com.tangem.datasource.local.userwallet.UserWalletsStore
|
||||
|
|
@ -30,7 +30,7 @@ import javax.inject.Inject
|
|||
*/
|
||||
@Suppress("LongParameterList")
|
||||
internal class DefaultMultiNetworkStatusFetcher @Inject constructor(
|
||||
private val networksStatusesStore: NetworksStatusesStoreV2,
|
||||
private val networksStatusesStore: NetworksStatusesStore,
|
||||
private val userWalletsStore: UserWalletsStore,
|
||||
private val cardCryptoCurrencyFactory: CardCryptoCurrencyFactory,
|
||||
private val commonNetworkStatusFetcher: CommonNetworkStatusFetcher,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.tangem.data.networks.multi
|
|||
|
||||
import com.tangem.blockchainsdk.utils.ExcludedBlockchains
|
||||
import com.tangem.data.common.currency.getNetwork
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.datasource.local.userwallet.UserWalletsStore
|
||||
import com.tangem.domain.models.network.NetworkStatus
|
||||
import com.tangem.domain.networks.multi.MultiNetworkStatusProducer
|
||||
|
|
@ -24,7 +24,7 @@ import timber.log.Timber
|
|||
*/
|
||||
internal class DefaultMultiNetworkStatusProducer @AssistedInject constructor(
|
||||
@Assisted val params: MultiNetworkStatusProducer.Params,
|
||||
private val networksStatusesStore: NetworksStatusesStoreV2,
|
||||
private val networksStatusesStore: NetworksStatusesStore,
|
||||
private val userWalletsStore: UserWalletsStore,
|
||||
private val excludedBlockchains: ExcludedBlockchains,
|
||||
private val dispatchers: CoroutineDispatcherProvider,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.tangem.data.networks.repository
|
||||
|
||||
import com.tangem.data.common.currency.CardCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.data.networks.store.storeStatus
|
||||
import com.tangem.data.networks.utils.NetworkStatusFactory
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
|
|
@ -27,7 +27,7 @@ import timber.log.Timber
|
|||
internal class DefaultNetworksRepository(
|
||||
private val cardCryptoCurrencyFactory: CardCryptoCurrencyFactory,
|
||||
private val walletManagersFacade: WalletManagersFacade,
|
||||
private val networksStatusesStore: NetworksStatusesStoreV2,
|
||||
private val networksStatusesStore: NetworksStatusesStore,
|
||||
private val dispatchers: CoroutineDispatcherProvider,
|
||||
) : NetworksRepository {
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.tangem.data.networks.single
|
|||
import arrow.core.Either
|
||||
import com.tangem.data.common.currency.CardCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.fetcher.CommonNetworkStatusFetcher
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.data.networks.store.setSourceAsCache
|
||||
import com.tangem.domain.core.utils.catchOn
|
||||
import com.tangem.domain.networks.single.SingleNetworkStatusFetcher
|
||||
|
|
@ -22,7 +22,7 @@ import javax.inject.Inject
|
|||
*/
|
||||
internal class DefaultSingleNetworkStatusFetcher @Inject constructor(
|
||||
private val commonNetworkStatusFetcher: CommonNetworkStatusFetcher,
|
||||
private val networksStatusesStore: NetworksStatusesStoreV2,
|
||||
private val networksStatusesStore: NetworksStatusesStore,
|
||||
private val cardCryptoCurrencyFactory: CardCryptoCurrencyFactory,
|
||||
private val dispatchers: CoroutineDispatcherProvider,
|
||||
) : SingleNetworkStatusFetcher {
|
||||
|
|
|
|||
|
|
@ -25,17 +25,17 @@ internal typealias WalletIdWithSimpleStatus = Map<String, Set<SimpleNetworkStatu
|
|||
internal typealias WalletIdWithStatusDM = Map<String, Set<NetworkStatusDM>>
|
||||
|
||||
/**
|
||||
* Default implementation of [NetworksStatusesStoreV2]
|
||||
* Default implementation of [NetworksStatusesStore]
|
||||
*
|
||||
* @property runtimeStore runtime store
|
||||
* @property persistenceDataStore persistence store
|
||||
* @param dispatchers dispatchers
|
||||
*/
|
||||
internal class DefaultNetworksStatusesStoreV2(
|
||||
internal class DefaultNetworksStatusesStore(
|
||||
private val runtimeStore: RuntimeSharedStore<WalletIdWithSimpleStatus>,
|
||||
private val persistenceDataStore: DataStore<WalletIdWithStatusDM>,
|
||||
dispatchers: CoroutineDispatcherProvider,
|
||||
) : NetworksStatusesStoreV2 {
|
||||
) : NetworksStatusesStore {
|
||||
|
||||
private val scope = CoroutineScope(context = SupervisorJob() + dispatchers.io)
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ import timber.log.Timber
|
|||
* Store actual network [status] by [userWalletId].
|
||||
* If [status]'s source is not [StatusSource.ACTUAL], throws exception.
|
||||
*/
|
||||
internal suspend fun NetworksStatusesStoreV2.storeStatus(userWalletId: UserWalletId, status: NetworkStatus) {
|
||||
internal suspend fun NetworksStatusesStore.storeStatus(userWalletId: UserWalletId, status: NetworkStatus) {
|
||||
if (status.value is NetworkStatus.Unreachable) {
|
||||
val prevStatus = getSyncOrNull(userWalletId = userWalletId, network = status.network)
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ internal suspend fun NetworksStatusesStoreV2.storeStatus(userWalletId: UserWalle
|
|||
* Store actual success [status] by [userWalletId].
|
||||
* If [status]'s value is [NetworkStatus.Unreachable] and/or source is not [StatusSource.ACTUAL], throws exception.
|
||||
*/
|
||||
internal suspend fun NetworksStatusesStoreV2.storeSuccess(userWalletId: UserWalletId, status: NetworkStatus) {
|
||||
internal suspend fun NetworksStatusesStore.storeSuccess(userWalletId: UserWalletId, status: NetworkStatus) {
|
||||
if (status.value is NetworkStatus.Unreachable) {
|
||||
val message = "Use storeError method to save unreachable status"
|
||||
Timber.d(message)
|
||||
|
|
@ -57,12 +57,12 @@ internal suspend fun NetworksStatusesStoreV2.storeSuccess(userWalletId: UserWall
|
|||
}
|
||||
|
||||
/** Set [StatusSource] as [StatusSource.CACHE] for [network] by [userWalletId] */
|
||||
internal suspend fun NetworksStatusesStoreV2.setSourceAsCache(userWalletId: UserWalletId, network: Network) {
|
||||
internal suspend fun NetworksStatusesStore.setSourceAsCache(userWalletId: UserWalletId, network: Network) {
|
||||
setSourceAsCache(userWalletId = userWalletId, networks = setOf(network))
|
||||
}
|
||||
|
||||
/** Set [StatusSource] as [StatusSource.CACHE] for [networks] by [userWalletId] */
|
||||
internal suspend fun NetworksStatusesStoreV2.setSourceAsCache(userWalletId: UserWalletId, networks: Set<Network>) {
|
||||
internal suspend fun NetworksStatusesStore.setSourceAsCache(userWalletId: UserWalletId, networks: Set<Network>) {
|
||||
updateStatusSource(userWalletId = userWalletId, networks = networks, source = StatusSource.CACHE)
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ internal suspend fun NetworksStatusesStoreV2.setSourceAsCache(userWalletId: User
|
|||
* Set [StatusSource] as [StatusSource.ONLY_CACHE] for [network] by [userWalletId].
|
||||
* If the stored status is not found, store the [value] or a default [NetworkStatus.Unreachable] status.
|
||||
*/
|
||||
internal suspend fun NetworksStatusesStoreV2.setSourceAsOnlyCache(
|
||||
internal suspend fun NetworksStatusesStore.setSourceAsOnlyCache(
|
||||
userWalletId: UserWalletId,
|
||||
network: Network,
|
||||
value: NetworkStatus.Unreachable? = null,
|
||||
|
|
@ -90,7 +90,7 @@ internal suspend fun NetworksStatusesStoreV2.setSourceAsOnlyCache(
|
|||
* Set [StatusSource] as [StatusSource.ONLY_CACHE] for [networks] by [userWalletId].
|
||||
* If the stored status is not found, store a default [NetworkStatus.Unreachable] status.
|
||||
*/
|
||||
internal suspend fun NetworksStatusesStoreV2.setSourceAsOnlyCache(userWalletId: UserWalletId, networks: Set<Network>) {
|
||||
internal suspend fun NetworksStatusesStore.setSourceAsOnlyCache(userWalletId: UserWalletId, networks: Set<Network>) {
|
||||
updateStatusSource(
|
||||
userWalletId = userWalletId,
|
||||
networks = networks,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.tangem.domain.wallets.models.UserWalletId
|
|||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
/** Store of [NetworkStatus]'es set */
|
||||
internal interface NetworksStatusesStoreV2 {
|
||||
internal interface NetworksStatusesStore {
|
||||
|
||||
/** Get statuses by [userWalletId] */
|
||||
fun get(userWalletId: UserWalletId): Flow<Set<SimpleNetworkStatus>>
|
||||
|
|
@ -7,7 +7,7 @@ import com.tangem.common.test.domain.network.MockNetworkStatusFactory
|
|||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.common.test.domain.walletmanager.MockUpdateWalletManagerResultFactory
|
||||
import com.tangem.common.test.utils.ProvideTestModels
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.data.networks.store.setSourceAsOnlyCache
|
||||
import com.tangem.data.networks.store.storeStatus
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
|
|
@ -31,7 +31,7 @@ import org.junit.jupiter.params.ParameterizedTest
|
|||
internal class CommonNetworkStatusFetcherTest {
|
||||
|
||||
private val walletManagersFacade: WalletManagersFacade = mockk()
|
||||
private val networksStatusesStore: NetworksStatusesStoreV2 = mockk(relaxUnitFun = true)
|
||||
private val networksStatusesStore: NetworksStatusesStore = mockk(relaxUnitFun = true)
|
||||
|
||||
private val fetcher = CommonNetworkStatusFetcher(
|
||||
walletManagersFacade = walletManagersFacade,
|
||||
|
|
@ -106,6 +106,7 @@ internal class CommonNetworkStatusFetcherTest {
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
private fun provideTestModels() = listOf(
|
||||
SuccessTestModel(
|
||||
updateResult = UpdateWalletManagerResult.MissedDerivation,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
|||
import com.tangem.common.test.domain.wallet.MockUserWalletFactory
|
||||
import com.tangem.data.common.currency.CardCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.fetcher.CommonNetworkStatusFetcher
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.data.networks.store.setSourceAsCache
|
||||
import com.tangem.data.networks.store.setSourceAsOnlyCache
|
||||
import com.tangem.datasource.local.userwallet.UserWalletsStore
|
||||
|
|
@ -28,7 +28,7 @@ import org.junit.jupiter.api.TestInstance
|
|||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
internal class DefaultMultiNetworkStatusFetcherTest {
|
||||
|
||||
private val networksStatusesStore: NetworksStatusesStoreV2 = mockk(relaxUnitFun = true)
|
||||
private val networksStatusesStore: NetworksStatusesStore = mockk(relaxUnitFun = true)
|
||||
private val userWalletsStore: UserWalletsStore = mockk()
|
||||
private val cardCryptoCurrencyFactory: CardCryptoCurrencyFactory = mockk()
|
||||
private val commonNetworkStatusFetcher: CommonNetworkStatusFetcher = mockk()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
|||
import com.tangem.common.test.domain.wallet.MockUserWalletFactory
|
||||
import com.tangem.common.test.utils.getEmittedValues
|
||||
import com.tangem.data.networks.models.SimpleNetworkStatus
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.data.networks.toSimple
|
||||
import com.tangem.datasource.local.userwallet.UserWalletsStore
|
||||
import com.tangem.domain.common.configs.GenericCardConfig
|
||||
|
|
@ -30,7 +30,7 @@ internal class DefaultMultiNetworkStatusProducerTest {
|
|||
|
||||
private val params = MultiNetworkStatusProducer.Params(userWalletId = userWallet.walletId)
|
||||
|
||||
private val networksStatusesStore = mockk<NetworksStatusesStoreV2>()
|
||||
private val networksStatusesStore = mockk<NetworksStatusesStore>()
|
||||
private val userWalletsStore = mockk<UserWalletsStore>()
|
||||
private val excludedBlockchains = mockk<ExcludedBlockchains>()
|
||||
private val dispatchers = TestingCoroutineDispatcherProvider()
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import com.google.common.truth.Truth
|
|||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.common.test.domain.walletmanager.MockUpdateWalletManagerResultFactory
|
||||
import com.tangem.data.common.currency.CardCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.data.networks.store.storeStatus
|
||||
import com.tangem.data.networks.utils.NetworkStatusFactory
|
||||
import com.tangem.domain.models.network.CryptoCurrencyAddress
|
||||
|
|
@ -28,7 +28,7 @@ internal class DefaultNetworksRepositoryTest {
|
|||
|
||||
private val cardCryptoCurrencyFactory: CardCryptoCurrencyFactory = mockk()
|
||||
private val walletManagersFacade: WalletManagersFacade = mockk()
|
||||
private val networksStatusesStore: NetworksStatusesStoreV2 = mockk(relaxUnitFun = true)
|
||||
private val networksStatusesStore: NetworksStatusesStore = mockk(relaxUnitFun = true)
|
||||
|
||||
private val repository: DefaultNetworksRepository = DefaultNetworksRepository(
|
||||
cardCryptoCurrencyFactory = cardCryptoCurrencyFactory,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.google.common.truth.Truth
|
|||
import com.tangem.common.test.domain.token.MockCryptoCurrencyFactory
|
||||
import com.tangem.data.common.currency.CardCryptoCurrencyFactory
|
||||
import com.tangem.data.networks.fetcher.CommonNetworkStatusFetcher
|
||||
import com.tangem.data.networks.store.NetworksStatusesStoreV2
|
||||
import com.tangem.data.networks.store.NetworksStatusesStore
|
||||
import com.tangem.data.networks.store.setSourceAsCache
|
||||
import com.tangem.domain.networks.single.SingleNetworkStatusFetcher
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
|
|
@ -24,7 +24,7 @@ import org.junit.jupiter.api.TestInstance
|
|||
internal class DefaultSingleNetworkStatusFetcherTest {
|
||||
|
||||
private val commonNetworkStatusFetcher: CommonNetworkStatusFetcher = mockk()
|
||||
private val networksStatusesStore: NetworksStatusesStoreV2 = mockk(relaxUnitFun = true)
|
||||
private val networksStatusesStore: NetworksStatusesStore = mockk(relaxUnitFun = true)
|
||||
private val cardCryptoCurrencyFactory: CardCryptoCurrencyFactory = mockk()
|
||||
|
||||
private val fetcher = DefaultSingleNetworkStatusFetcher(
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ internal class GetTest {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ internal class InitializationTest {
|
|||
|
||||
every { persistenceStore.data } returns emptyFlow()
|
||||
|
||||
DefaultNetworksStatusesStoreV2(
|
||||
DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
@ -43,7 +43,7 @@ internal class InitializationTest {
|
|||
val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
DefaultNetworksStatusesStoreV2(
|
||||
DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
@ -65,7 +65,7 @@ internal class InitializationTest {
|
|||
}
|
||||
}
|
||||
|
||||
DefaultNetworksStatusesStoreV2(
|
||||
DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ internal class ParameterizedStoreStatusTest(private val model: Model) {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ internal class ParameterizedStoreSuccessTest(private val model: Model) {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ internal class ParameterizedStoreTest(private val model: Model) {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ internal class SetSourceAsCacheTest {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ internal class SetSourceAsOnlyCacheTest {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ internal class StoreStatusTest {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ internal class StoreSuccessTest {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ internal class StoreTest {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ internal class UpdateStatusSourceTest {
|
|||
private val runtimeStore = RuntimeSharedStore<WalletIdWithSimpleStatus>()
|
||||
private val persistenceStore = MockStateDataStore<WalletIdWithStatusDM>(default = emptyMap())
|
||||
|
||||
private val store = DefaultNetworksStatusesStoreV2(
|
||||
private val store = DefaultNetworksStatusesStore(
|
||||
runtimeStore = runtimeStore,
|
||||
persistenceDataStore = persistenceStore,
|
||||
dispatchers = TestingCoroutineDispatcherProvider(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue