Updated on 2026-08-14

This commit is contained in:
Tangem 2024-05-29 15:57:18 +04:00
parent 5d206bd37f
commit 96070a18c2
4 changed files with 19 additions and 16 deletions

View file

@ -23,7 +23,6 @@ import com.tangem.domain.common.util.hasDerivation
import com.tangem.domain.core.error.DataError
import com.tangem.domain.core.lce.LceFlow
import com.tangem.domain.core.lce.lceFlow
import com.tangem.domain.core.utils.lceError
import com.tangem.domain.demo.DemoConfig
import com.tangem.domain.tokens.model.CryptoCurrency
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
@ -228,7 +227,7 @@ internal class DefaultCurrenciesRepository(
): LceFlow<Throwable, List<CryptoCurrency>> = lceFlow {
val userWallet = getUserWallet(userWalletId)
catch({ ensureIsCorrectUserWallet(userWallet, isMultiCurrencyWalletExpected = true) }) {
raise(it.lceError())
raise(it)
}
launch(dispatchers.io) {
@ -242,7 +241,7 @@ internal class DefaultCurrenciesRepository(
withContext(dispatchers.io) {
catch({ fetchTokensIfCacheExpired(userWallet, refresh = false) }) {
raise(it.lceError())
raise(it)
}
}
}

View file

@ -14,7 +14,6 @@ import com.tangem.datasource.local.userwallet.UserWalletsStore
import com.tangem.domain.common.util.cardTypesResolver
import com.tangem.domain.core.lce.LceFlow
import com.tangem.domain.core.lce.lceFlow
import com.tangem.domain.core.utils.lceError
import com.tangem.domain.demo.DemoConfig
import com.tangem.domain.tokens.model.CryptoCurrency
import com.tangem.domain.tokens.model.CryptoCurrencyAddress
@ -78,7 +77,7 @@ internal class DefaultNetworksRepository(
withContext(dispatchers.io) {
catch({ fetchNetworksStatusesIfCacheExpired(userWalletId, networks, refresh = false) }) {
raise(it.lceError())
raise(it)
}
}
}