Updated on 2026-08-14
This commit is contained in:
parent
df4288e70a
commit
40ea340c41
2 changed files with 7 additions and 3 deletions
|
|
@ -167,7 +167,10 @@ internal class CurrenciesStatusesLceOperations(
|
|||
private fun getQuotes(tokensIds: NonEmptySet<CryptoCurrency.ID>): Flow<Either<TokenListError, Set<Quote>>> {
|
||||
return quotesRepository.getQuotesUpdates(tokensIds)
|
||||
.map<Set<Quote>, Either<TokenListError, Set<Quote>>> { it.right() }
|
||||
.catch { emit(TokenListError.DataError(it).left()) }
|
||||
.retryWhen { cause, _ ->
|
||||
emit(TokenListError.DataError(cause).left())
|
||||
true
|
||||
}
|
||||
.distinctUntilChanged()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -348,8 +348,9 @@ internal class CurrenciesStatusesOperations(
|
|||
.map<Set<Quote>, Either<Error, Set<Quote>>> { quotes ->
|
||||
if (quotes.isEmpty()) Error.EmptyQuotes.left() else quotes.right()
|
||||
}
|
||||
.catch {
|
||||
emit(Error.DataError(it).left())
|
||||
.retryWhen { cause, _ ->
|
||||
emit(Error.DataError(cause).left())
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue