Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-16 13:32:13 +04:00
parent a5a8cee12c
commit 9b1bf5813f
15 changed files with 895 additions and 30 deletions

View file

@ -0,0 +1,14 @@
package com.tangem.domain.account.producer
import com.tangem.domain.account.models.AccountList
import com.tangem.domain.core.flow.FlowProducer
/**
* Produces a list of [AccountList]s for all user wallets.
*
[REDACTED_AUTHOR]
*/
interface MultiAccountListProducer : FlowProducer<List<AccountList>> {
interface Factory : FlowProducer.Factory<Unit, MultiAccountListProducer>
}

View file

@ -0,0 +1,17 @@
package com.tangem.domain.account.producer
import com.tangem.domain.account.models.AccountList
import com.tangem.domain.core.flow.FlowProducer
import com.tangem.domain.models.wallet.UserWalletId
/**
* Produces a list of [AccountList] for a specific user wallet.
*
[REDACTED_AUTHOR]
*/
interface SingleAccountListProducer : FlowProducer<AccountList> {
data class Params(val userWalletId: UserWalletId)
interface Factory : FlowProducer.Factory<Params, SingleAccountListProducer>
}

View file

@ -0,0 +1,21 @@
package com.tangem.domain.account.supplier
import com.tangem.domain.account.models.AccountList
import com.tangem.domain.account.producer.MultiAccountListProducer
import com.tangem.domain.core.flow.FlowCachingSupplier
import kotlinx.coroutines.flow.Flow
/**
* Supplier that provides a list of [AccountList]s for all user wallets.
*
[REDACTED_AUTHOR]
*/
abstract class MultiAccountListSupplier(
override val factory: MultiAccountListProducer.Factory,
override val keyCreator: (Unit) -> String,
) : FlowCachingSupplier<MultiAccountListProducer, Unit, List<AccountList>>() {
operator fun invoke(): Flow<List<AccountList>> {
return super.invoke(params = Unit)
}
}

View file

@ -0,0 +1,15 @@
package com.tangem.domain.account.supplier
import com.tangem.domain.account.models.AccountList
import com.tangem.domain.account.producer.SingleAccountListProducer
import com.tangem.domain.core.flow.FlowCachingSupplier
/**
* Supplier that provides a single [AccountList] for a specific user wallet.
*
[REDACTED_AUTHOR]
*/
abstract class SingleAccountListSupplier(
override val factory: SingleAccountListProducer.Factory,
override val keyCreator: (SingleAccountListProducer.Params) -> String,
) : FlowCachingSupplier<SingleAccountListProducer, SingleAccountListProducer.Params, AccountList>()