Updated on 2026-08-14
This commit is contained in:
parent
6036c65b64
commit
80a13febdf
5 changed files with 33 additions and 33 deletions
|
|
@ -226,19 +226,18 @@ internal class OnrampV2MainComponentModel @Inject constructor(
|
|||
}
|
||||
|
||||
private fun subscribeOnOffers() = modelScope.launch {
|
||||
getOnrampOffersUseCase.invoke(
|
||||
userWalletId = userWallet.walletId,
|
||||
cryptoCurrencyId = params.cryptoCurrency.id,
|
||||
).collectLatest { maybeOffers ->
|
||||
maybeOffers.fold(
|
||||
ifLeft = ::handleOnrampError,
|
||||
ifRight = { offers ->
|
||||
if (offers.isNotEmpty()) {
|
||||
_state.update { onrampOffersStateFactory.getOffersState(offers) }
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
getOnrampOffersUseCase
|
||||
.invoke()
|
||||
.collectLatest { maybeOffers ->
|
||||
maybeOffers.fold(
|
||||
ifLeft = ::handleOnrampError,
|
||||
ifRight = { offers ->
|
||||
if (offers.isNotEmpty()) {
|
||||
_state.update { onrampOffersStateFactory.getOffersState(offers) }
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun subscribeToAmountChanges() = modelScope.launch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue