Updated on 2026-08-14
This commit is contained in:
parent
30613125f8
commit
3451c40021
2 changed files with 5 additions and 3 deletions
|
|
@ -17,14 +17,15 @@ internal class OnrampOffersStateFactory(
|
|||
fun getOffersState(offers: List<OnrampOffersBlock>): 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ internal class OnrampV2AmountStateFactory(
|
|||
currencySymbol = currency.unit,
|
||||
onAmountValueChanged = onrampIntents::onAmountValueChanged,
|
||||
),
|
||||
offersBlockState = OnrampOffersBlockUM.Loading,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue