Updated on 2026-08-14

This commit is contained in:
Tangem 2025-05-12 11:54:14 +04:00
parent 3dd8b879ee
commit 90c64f8982
12 changed files with 292 additions and 193 deletions

View file

@ -1,6 +1,7 @@
package com.tangem.domain.networks.single
import com.tangem.domain.core.flow.FlowFetcher
import com.tangem.domain.tokens.model.CryptoCurrency
import com.tangem.domain.tokens.model.Network
import com.tangem.domain.wallets.models.UserWalletId
@ -11,16 +12,18 @@ import com.tangem.domain.wallets.models.UserWalletId
*/
interface SingleNetworkStatusFetcher : FlowFetcher<SingleNetworkStatusFetcher.Params> {
/**
* Params
*
* @property userWalletId wallet id
* @property network network
* @property applyRefresh flag that determines whether to apply refresh (see DefaultMultiNetworkStatusFetcher)
*/
data class Params(
val userWalletId: UserWalletId,
val network: Network,
val applyRefresh: Boolean = true,
)
/** Params */
sealed interface Params {
val userWalletId: UserWalletId
val network: Network
data class Simple(override val userWalletId: UserWalletId, override val network: Network) : Params
data class Prepared(
override val userWalletId: UserWalletId,
override val network: Network,
val addedNetworkCurrencies: Set<CryptoCurrency>,
) : Params
}
}