Updated on 2026-08-14

This commit is contained in:
Tangem 2024-09-30 11:11:40 +05:00
parent f686146bcb
commit 48f657e1a6
3 changed files with 5 additions and 13 deletions

View file

@ -16,7 +16,7 @@ internal class DefaultOnrampRepository(
) : OnrampRepository {
private val currencyConverter = CurrencyConverter()
private val countryConverter = CountryConverter(currencyConverter)
private val countryConverter = CountryConverter()
override suspend fun getCurrencies(): List<OnrampCurrency> = withContext(dispatchers.io) {
onrampApi.getCurrencies()

View file

@ -4,9 +4,9 @@ import com.tangem.datasource.api.onramp.models.response.model.OnrampCountryDTO
import com.tangem.domain.onramp.model.OnrampCountry
import com.tangem.utils.converter.Converter
internal class CountryConverter(
private val currencyConverter: CurrencyConverter,
) : Converter<OnrampCountryDTO, OnrampCountry> {
internal class CountryConverter : Converter<OnrampCountryDTO, OnrampCountry> {
private val currencyConverter = CurrencyConverter()
override fun convert(value: OnrampCountryDTO) = OnrampCountry(
name = value.name,

View file

@ -1,20 +1,12 @@
plugins {
alias(deps.plugins.android.library)
alias(deps.plugins.kotlin.android)
alias(deps.plugins.kotlin.jvm)
alias(deps.plugins.kotlin.serialization)
id("configuration")
}
android {
namespace = "com.tangem.domain.onramp"
}
dependencies {
api(projects.domain.onramp.models)
api(projects.domain.core)
implementation(deps.kotlin.serialization)
implementation(projects.domain.tokens.models)
implementation(projects.domain.wallets.models)
}