Updated on 2026-08-14

This commit is contained in:
Tangem 2024-06-10 13:56:07 +05:00
commit a8fd203258
3 changed files with 4 additions and 4 deletions

View file

@ -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) }
}
}

View file

@ -30,5 +30,5 @@ interface QuotesRepository {
*/
suspend fun getQuotesSync(currenciesIds: Set<CryptoCurrency.ID>, refresh: Boolean): Set<Quote>
suspend fun getQuoteSync(currencyId: CryptoCurrency.ID): Quote
suspend fun getQuoteSync(currencyId: CryptoCurrency.ID): Quote?
}

View file

@ -345,4 +345,5 @@ private val excludedBlockchains = listOf(
Blockchain.MantleTestnet,
Blockchain.Koinos,
Blockchain.KoinosTestnet,
Blockchain.Bittensor,
)