Updated on 2026-08-14
This commit is contained in:
parent
e6de882b3b
commit
c9b99c587d
5 changed files with 277 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
package com.tangem.domain.staking.multi
|
||||
|
||||
import com.tangem.domain.core.flow.FlowProducer
|
||||
import com.tangem.domain.staking.model.stakekit.YieldBalance
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
|
||||
/**
|
||||
* Producer of all yield balances for selected wallet [UserWalletId]
|
||||
*
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
interface MultiYieldBalanceProducer : FlowProducer<Set<YieldBalance>> {
|
||||
|
||||
data class Params(val userWalletId: UserWalletId)
|
||||
|
||||
interface Factory : FlowProducer.Factory<Params, MultiYieldBalanceProducer>
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.tangem.domain.staking.multi
|
||||
|
||||
import com.tangem.domain.core.flow.FlowCachingSupplier
|
||||
import com.tangem.domain.core.flow.FlowProducer
|
||||
import com.tangem.domain.staking.model.stakekit.YieldBalance
|
||||
|
||||
/**
|
||||
* Supplier of all yield balances for selected wallet [MultiYieldBalanceProducer.Params]
|
||||
*
|
||||
* @property factory factory for creating [MultiYieldBalanceProducer]
|
||||
* @property keyCreator key creator
|
||||
*
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
abstract class MultiYieldBalanceSupplier(
|
||||
override val factory: FlowProducer.Factory<MultiYieldBalanceProducer.Params, MultiYieldBalanceProducer>,
|
||||
override val keyCreator: (MultiYieldBalanceProducer.Params) -> String,
|
||||
) : FlowCachingSupplier<MultiYieldBalanceProducer, MultiYieldBalanceProducer.Params, Set<YieldBalance>>()
|
||||
Loading…
Add table
Add a link
Reference in a new issue