Updated on 2026-08-14
This commit is contained in:
parent
b5a54b0e29
commit
7190b70fd0
2 changed files with 10 additions and 7 deletions
|
|
@ -55,7 +55,10 @@ internal class DefaultOnrampMainComponent @AssistedInject constructor(
|
|||
context = childByContext(componentContext),
|
||||
params = ConfirmResidencyComponent.Params(
|
||||
country = config.country,
|
||||
onDismiss = { model.bottomSheetNavigation.dismiss() },
|
||||
onDismiss = {
|
||||
model.bottomSheetNavigation.dismiss()
|
||||
model.handleOnrampAvailable(it.defaultCurrency)
|
||||
},
|
||||
),
|
||||
)
|
||||
is OnrampMainBottomSheetConfig.CurrenciesList -> selectCurrencyComponentFactory.create(
|
||||
|
|
|
|||
|
|
@ -88,6 +88,12 @@ internal class OnrampMainComponentModel @Inject constructor(
|
|||
)
|
||||
}
|
||||
|
||||
fun handleOnrampAvailable(currency: OnrampCurrency) {
|
||||
_state.update { stateFactory.getReadyState(currency) }
|
||||
subscribeToCurrencyUpdates()
|
||||
subscribeToQuotesUpdate()
|
||||
}
|
||||
|
||||
fun onProviderSelected(providerWithQuote: OnrampProviderWithQuote.Data) {
|
||||
_state.update { amountStateFactory.getAmountSecondaryUpdatedState(providerWithQuote) }
|
||||
}
|
||||
|
|
@ -109,12 +115,6 @@ internal class OnrampMainComponentModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun handleOnrampAvailable(currency: OnrampCurrency) {
|
||||
_state.update { stateFactory.getReadyState(currency) }
|
||||
subscribeToCurrencyUpdates()
|
||||
subscribeToQuotesUpdate()
|
||||
}
|
||||
|
||||
private fun subscribeToCurrencyUpdates() {
|
||||
getOnrampCurrencyUseCase.invoke()
|
||||
.onEach { maybeCurrency ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue