Updated on 2026-08-14
This commit is contained in:
parent
f50a76da2d
commit
8c3071ed1b
1 changed files with 12 additions and 4 deletions
|
|
@ -264,10 +264,18 @@ internal class CurrenciesStatusesOperations(
|
|||
var quotesRetrievingFailed = false
|
||||
|
||||
val networksStatuses = maybeNetworkStatuses?.bind()?.toNonEmptySetOrNull()
|
||||
val quotes = recover({ maybeQuotes?.bind()?.toNonEmptySetOrNull() }) {
|
||||
quotesRetrievingFailed = true
|
||||
null
|
||||
}
|
||||
val quotes: Set<Quote>? = maybeQuotes?.fold(
|
||||
ifLeft = {
|
||||
quotesRetrievingFailed = true
|
||||
null
|
||||
},
|
||||
ifRight = {
|
||||
it.ifEmpty {
|
||||
quotesRetrievingFailed = true
|
||||
null
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
currencies.map { currency ->
|
||||
val quote = quotes?.firstOrNull { it.rawCurrencyId == currency.id.rawCurrencyId }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue