Updated on 2026-08-14

This commit is contained in:
Tangem 2024-11-21 12:12:33 +07:00
parent 82eda99ca7
commit 5aa2af25f1
9 changed files with 110 additions and 55 deletions

View file

@ -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) }
}
}