Updated on 2026-08-14
This commit is contained in:
parent
b2ba33d09e
commit
797ac056a8
8 changed files with 49 additions and 11 deletions
|
|
@ -35,6 +35,7 @@ dependencies {
|
|||
implementation(projects.features.swap.api)
|
||||
|
||||
/** Project - Other */
|
||||
implementation(projects.core.configToggles)
|
||||
implementation(projects.core.utils)
|
||||
implementation(projects.libs.crypto)
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
package com.tangem.domain.tokens
|
||||
|
||||
/**
|
||||
* Tokens feature toggles
|
||||
*
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
interface TokensFeatureToggles {
|
||||
|
||||
val isBalancesCachingEnabled: Boolean
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue