Updated on 2026-08-14
This commit is contained in:
parent
db7aa562c1
commit
1d810d815f
3 changed files with 26 additions and 26 deletions
|
|
@ -110,7 +110,7 @@ internal class OnrampMainComponentModel @Inject constructor(
|
|||
|
||||
private fun checkResidenceCountry() {
|
||||
modelScope.launch {
|
||||
checkOnrampAvailabilityUseCase.invoke(params.cryptoCurrency)
|
||||
checkOnrampAvailabilityUseCase.invoke()
|
||||
.onRight(::handleOnrampAvailability)
|
||||
.onLeft { Timber.e(it) }
|
||||
}
|
||||
|
|
@ -128,11 +128,9 @@ internal class OnrampMainComponentModel @Inject constructor(
|
|||
private fun subscribeToCurrencyUpdates() {
|
||||
getOnrampCurrencyUseCase.invoke()
|
||||
.onEach { maybeCurrency ->
|
||||
val currency = maybeCurrency.getOrNull()
|
||||
if (currency != null) {
|
||||
_state.update { amountStateFactory.getUpdatedCurrencyState(currency) }
|
||||
updatePairsAndQuotes()
|
||||
}
|
||||
val currency = maybeCurrency.getOrNull() ?: return@onEach
|
||||
_state.update { amountStateFactory.getUpdatedCurrencyState(currency) }
|
||||
updatePairsAndQuotes()
|
||||
}
|
||||
.launchIn(modelScope)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue