Updated on 2026-08-14
This commit is contained in:
parent
82eda99ca7
commit
5aa2af25f1
9 changed files with 110 additions and 55 deletions
|
|
@ -15,10 +15,10 @@ class GetCurrencyQuotesUseCase(
|
|||
currencyID: CryptoCurrency.ID,
|
||||
interval: PriceChangeInterval,
|
||||
refresh: Boolean,
|
||||
): Flow<Option<Quote>> {
|
||||
): Flow<Option<Quote.Value>> {
|
||||
return quotesRepository.getQuotesUpdates(
|
||||
currenciesIds = setOf(currencyID),
|
||||
refresh = refresh,
|
||||
).map { it.firstOrNull().toOption() }.catch { emit(None) }
|
||||
).map { it.filterIsInstance<Quote.Value>().firstOrNull().toOption() }.catch { emit(None) }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue