Updated on 2026-08-14
This commit is contained in:
parent
f686146bcb
commit
48f657e1a6
3 changed files with 5 additions and 13 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue