From 09d6f9baa617378f90d8c4287cf877c426f31569 Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 28 Aug 2025 13:56:04 +0500 Subject: [PATCH] Updated on 2026-08-14 --- .../features/send/v2/entrypoint/model/SendEntryPointModel.kt | 5 ++++- .../send/v2/subcomponents/amount/model/SendAmountModel.kt | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt index 984330ba7d..f18192f9f9 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/entrypoint/model/SendEntryPointModel.kt @@ -69,6 +69,9 @@ internal class SendEntryPointModel @Inject constructor( } override fun onBack() { - router.pop() + modelScope.launch { + sendAmountUpdateTrigger.triggerUpdateAmount(lastSavedAmount) + router.pop() + } } } \ No newline at end of file diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt index 72f75f5424..f1079ab4ee 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt @@ -257,6 +257,11 @@ internal class SendAmountModel @Inject constructor( private fun confirmConvertToToken() { val amountParams = params as? SendAmountComponentParams.AmountParams ?: return val amountFieldData = uiState.value as? AmountState.Data + _uiState.update { + (it as? AmountState.Data)?.copy( + isPrimaryButtonEnabled = false, + ) ?: it + } amountParams.callback.onConvertToAnotherToken(amountFieldData?.amountTextField?.value.orEmpty()) }