Updated on 2026-08-14
This commit is contained in:
parent
94b459d7c2
commit
13fd91fc8c
11 changed files with 93 additions and 101 deletions
|
|
@ -5,6 +5,7 @@ import com.tangem.core.ui.decompose.ComposableBottomSheetComponent
|
|||
import com.tangem.domain.managetokens.model.ManagedCryptoCurrency
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.swap.models.SwapCurrencies
|
||||
|
||||
interface SwapChooseTokenNetworkComponent : ComposableBottomSheetComponent {
|
||||
|
||||
|
|
@ -13,7 +14,7 @@ interface SwapChooseTokenNetworkComponent : ComposableBottomSheetComponent {
|
|||
val initialCurrency: CryptoCurrency,
|
||||
val token: ManagedCryptoCurrency.Token,
|
||||
val onDismiss: () -> Unit,
|
||||
val onResult: (CryptoCurrency) -> Unit,
|
||||
val onResult: (SwapCurrencies, CryptoCurrency) -> Unit,
|
||||
)
|
||||
|
||||
interface Factory : ComponentFactory<Params, SwapChooseTokenNetworkComponent>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.features.swap.v2.api.choosetoken
|
||||
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.swap.models.SwapCurrencies
|
||||
import kotlinx.coroutines.flow.SharedFlow
|
||||
|
||||
/**
|
||||
|
|
@ -8,12 +9,12 @@ import kotlinx.coroutines.flow.SharedFlow
|
|||
*/
|
||||
interface SwapChooseTokenNetworkTrigger {
|
||||
|
||||
suspend fun trigger(cryptoCurrency: CryptoCurrency)
|
||||
suspend fun trigger(swapCurrencies: SwapCurrencies, cryptoCurrency: CryptoCurrency)
|
||||
}
|
||||
|
||||
/**
|
||||
* Listens to swap token selection
|
||||
*/
|
||||
interface SwapChooseTokenNetworkListener {
|
||||
val swapChooseTokenNetworkResultFlow: SharedFlow<CryptoCurrency>
|
||||
val swapChooseTokenNetworkResultFlow: SharedFlow<Pair<SwapCurrencies, CryptoCurrency>>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue