Updated on 2026-08-14

This commit is contained in:
Tangem 2025-02-14 16:23:01 +04:00
parent b2ba33d09e
commit 797ac056a8
8 changed files with 49 additions and 11 deletions

View file

@ -35,6 +35,7 @@ dependencies {
implementation(projects.features.swap.api)
/** Project - Other */
implementation(projects.core.configToggles)
implementation(projects.core.utils)
implementation(projects.libs.crypto)

View file

@ -26,11 +26,12 @@ class GetTokenListUseCase(
private val quotesRepository: QuotesRepository,
private val networksRepository: NetworksRepository,
private val stakingRepository: StakingRepository,
private val tokensFeatureToggles: TokensFeatureToggles,
) {
@OptIn(ExperimentalCoroutinesApi::class)
fun launch(userWalletId: UserWalletId, usePersistenceCache: Boolean = false): LceFlow<TokenListError, TokenList> {
val statusesFlow = if (usePersistenceCache) {
fun launch(userWalletId: UserWalletId): LceFlow<TokenListError, TokenList> {
val statusesFlow = if (tokensFeatureToggles.isBalancesCachingEnabled) {
CurrenciesStatusesCachedOperations(
currenciesRepository = currenciesRepository,
quotesRepository = quotesRepository,

View file

@ -0,0 +1,11 @@
package com.tangem.domain.tokens
/**
* Tokens feature toggles
*
[REDACTED_AUTHOR]
*/
interface TokensFeatureToggles {
val isBalancesCachingEnabled: Boolean
}