Updated on 2026-08-14

This commit is contained in:
Tangem 2024-03-06 11:42:12 +05:00
parent 6c8865caae
commit 7062b730e3

View file

@ -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