Updated on 2026-08-14

This commit is contained in:
Tangem 2025-03-07 17:48:01 +03:00
parent c476d59006
commit 4b07bf45ef
5 changed files with 81 additions and 17 deletions

View file

@ -24,6 +24,7 @@ import com.tangem.utils.coroutines.CoroutineDispatcherProvider
import com.tangem.utils.coroutines.runCatching
import com.tangem.utils.isNullOrZero
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.withContext
@Suppress("LongParameterList")
@ -130,8 +131,8 @@ internal class DefaultRampManager(
private suspend fun getExchangeableFlag(userWalletId: UserWalletId, cryptoCurrency: CryptoCurrency): Boolean {
return withContext(dispatchers.io) {
val asset = expressServiceLoader.getInitializationStatus(userWalletId)
.value
.getOrNull()
.firstOrNull()
?.getOrNull()
?.find { cryptoCurrency.findAssetPredicate(it) }
asset?.exchangeAvailable ?: false