Updated on 2026-08-14

This commit is contained in:
Tangem 2024-12-11 12:10:06 +03:00
parent df4288e70a
commit 40ea340c41
2 changed files with 7 additions and 3 deletions

View file

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

View file

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