diff --git a/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultQuotesRepository.kt b/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultQuotesRepository.kt index d362189832..50dd420286 100644 --- a/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultQuotesRepository.kt +++ b/data/tokens/src/main/kotlin/com/tangem/data/tokens/repository/DefaultQuotesRepository.kt @@ -68,11 +68,10 @@ internal class DefaultQuotesRepository( } } - override suspend fun getQuoteSync(currencyId: CryptoCurrency.ID): Quote { + override suspend fun getQuoteSync(currencyId: CryptoCurrency.ID): Quote? { return withContext(dispatchers.io) { val quote = quotesStore.getSync(setOf(currencyId)).firstOrNull() - requireNotNull(quote) { "Unable to get quote for $currencyId" } - quotesConverter.convert(quote) + quote?.let { quotesConverter.convert(it) } } } diff --git a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/repository/QuotesRepository.kt b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/repository/QuotesRepository.kt index 4c38eda580..64a0d29a12 100644 --- a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/repository/QuotesRepository.kt +++ b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/repository/QuotesRepository.kt @@ -30,5 +30,5 @@ interface QuotesRepository { */ suspend fun getQuotesSync(currenciesIds: Set, refresh: Boolean): Set - suspend fun getQuoteSync(currencyId: CryptoCurrency.ID): Quote + suspend fun getQuoteSync(currencyId: CryptoCurrency.ID): Quote? } \ No newline at end of file diff --git a/libs/blockchain-sdk/src/main/java/com/tangem/blockchainsdk/utils/Blockchain.kt b/libs/blockchain-sdk/src/main/java/com/tangem/blockchainsdk/utils/Blockchain.kt index 0144f6c672..a781a35ada 100644 --- a/libs/blockchain-sdk/src/main/java/com/tangem/blockchainsdk/utils/Blockchain.kt +++ b/libs/blockchain-sdk/src/main/java/com/tangem/blockchainsdk/utils/Blockchain.kt @@ -345,4 +345,5 @@ private val excludedBlockchains = listOf( Blockchain.MantleTestnet, Blockchain.Koinos, Blockchain.KoinosTestnet, + Blockchain.Bittensor, ) \ No newline at end of file