Updated on 2026-08-14

This commit is contained in:
Tangem 2024-08-26 12:50:39 +03:00
commit 2d5bb7509d

View file

@ -56,7 +56,7 @@ internal class CurrenciesStatusesOperations(
} else {
currenciesRepository.getMultiCurrencyWalletCurrency(userWalletId, cryptoCurrencyId)
}
val quotes = quotesRepository.getQuoteSync(cryptoCurrencyId).right()
val quotes = quotesRepository.getQuoteSync(cryptoCurrencyId)?.right() ?: Error.EmptyQuotes.left()
val networkStatuses =
networksRepository.getNetworkStatusesSync(
userWalletId,
@ -100,7 +100,7 @@ internal class CurrenciesStatusesOperations(
catch = { raise(Error.DataError(it)) },
)
val quotes = catch(
block = { quotesRepository.getQuoteSync(currency.id).right() },
block = { quotesRepository.getQuoteSync(currency.id)?.right() ?: Error.EmptyQuotes.left() },
catch = { Error.DataError(it).left() },
)
val networkStatus = catch(