From 7062b730e3d5517d6ddd4bdb289428df60a28044 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 6 Mar 2024 11:42:12 +0500 Subject: [PATCH] Updated on 2026-08-14 --- .../send/impl/presentation/viewmodel/SendViewModel.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendViewModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendViewModel.kt index 621edfae39..d66bc61a03 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendViewModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendViewModel.kt @@ -475,6 +475,7 @@ internal class SendViewModel @Inject constructor( val isValidAddress = validateAddress(value) uiState = stateFactory.getOnRecipientAddressValidState(value, isValidAddress) type?.let { analyticsEventHandler.send(SendAnalyticEvents.AddressEntered(it, isValidAddress)) } + autoNextFromRecipient(type, isValidAddress) } }.saveIn(addressValidationJobHolder) } @@ -519,6 +520,12 @@ internal class SendViewModel @Inject constructor( ), ) } + + private fun autoNextFromRecipient(type: EnterAddressSource?, isValidAddress: Boolean) { + val isRecent = type == EnterAddressSource.RecentAddress + val isAddressOnly = uiState.recipientState?.memoTextField == null + if (isRecent && isAddressOnly && isValidAddress) onNextClick() + } // endregion // region fee