diff --git a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/mainv2/entity/factory/OnrampOffersStateFactory.kt b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/mainv2/entity/factory/OnrampOffersStateFactory.kt index 67f09bf351..60b8cc3570 100644 --- a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/mainv2/entity/factory/OnrampOffersStateFactory.kt +++ b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/mainv2/entity/factory/OnrampOffersStateFactory.kt @@ -17,14 +17,15 @@ internal class OnrampOffersStateFactory( fun getOffersState(offers: List): OnrampV2MainComponentUM { val currentState = currentStateProvider.invoke() return when (currentState) { + is OnrampV2MainComponentUM.InitialLoading -> currentState is OnrampV2MainComponentUM.Content -> { + if (currentState.offersBlockState is OnrampOffersBlockUM.Loading && offers.isEmpty()) { + return currentState + } currentState.copy( offersBlockState = mapOnrampOffersBlockToUM(offersBlocks = offers), ) } - is OnrampV2MainComponentUM.InitialLoading -> { - currentState - } } } diff --git a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/mainv2/entity/factory/OnrampV2AmountStateFactory.kt b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/mainv2/entity/factory/OnrampV2AmountStateFactory.kt index 2af5055bd7..499cb56a88 100644 --- a/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/mainv2/entity/factory/OnrampV2AmountStateFactory.kt +++ b/features/onramp/impl/src/main/kotlin/com/tangem/features/onramp/mainv2/entity/factory/OnrampV2AmountStateFactory.kt @@ -64,6 +64,7 @@ internal class OnrampV2AmountStateFactory( currencySymbol = currency.unit, onAmountValueChanged = onrampIntents::onAmountValueChanged, ), + offersBlockState = OnrampOffersBlockUM.Loading, ) }