Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-07 11:31:03 +05:00
parent 5514e3a195
commit 587d356bf3
4 changed files with 8 additions and 5 deletions

View file

@ -189,6 +189,6 @@ internal class SendWithSwapConfirmComponent @AssistedInject constructor(
}
interface ModelCallback {
fun onResult(sendWithSwapUM: SendWithSwapUM)
fun onResult(route: SendWithSwapRoute, sendWithSwapUM: SendWithSwapUM)
}
}

View file

@ -424,7 +424,8 @@ internal class SendWithSwapConfirmModel @Inject constructor(
val confirmUM = state.confirmUM
val isReadyToSend = confirmUM is ConfirmUM.Content && !confirmUM.isTransactionInProcess
params.callback.onResult(
state.copy(
route = SendWithSwapRoute.Confirm,
sendWithSwapUM = state.copy(
navigationUM = NavigationUM.Content(
title = resourceReference(id = R.string.send_with_swap_confirm_title),
subtitle = null,

View file

@ -116,8 +116,10 @@ internal class SendWithSwapModel @Inject constructor(
uiState.update { it.copy(destinationUM = destinationUM) }
}
override fun onResult(sendWithSwapUM: SendWithSwapUM) {
uiState.value = sendWithSwapUM
override fun onResult(route: SendWithSwapRoute, sendWithSwapUM: SendWithSwapUM) {
if (currentRoute.value == route) {
uiState.value = sendWithSwapUM
}
}
override fun onNavigationResult(navigationUM: NavigationUM) {

View file

@ -55,7 +55,7 @@ internal class SavedSwapTransactionListConverter(
userWallet = userWallet,
network = fromNetwork,
) ?: return null
val toNetwork = createSwapTransactionNetwork(fromToken, userWallet) ?: return null
val toNetwork = createSwapTransactionNetwork(toToken, userWallet) ?: return null
val toCryptoCurrency = responseCryptoCurrenciesFactory.createCurrency(
responseToken = toToken,
userWallet = userWallet,