Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-13 19:58:22 +03:00
parent 6018cf0b71
commit f7b10f3ed5
31 changed files with 446 additions and 105 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

@ -425,7 +425,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) {