Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-05 10:16:43 +01:00
parent 6036c65b64
commit 80a13febdf
5 changed files with 33 additions and 33 deletions

View file

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