Updated on 2026-08-14
This commit is contained in:
parent
dc4e8c740b
commit
fefe37a890
23 changed files with 285 additions and 140 deletions
|
|
@ -0,0 +1,21 @@
|
|||
package com.tangem.tap.network.exchangeServices
|
||||
|
||||
import com.tangem.domain.exchange.RampStateManager
|
||||
import com.tangem.domain.tokens.models.CryptoCurrency
|
||||
import com.tangem.tap.features.wallet.converters.CryptoCurrencyConverter
|
||||
|
||||
class DefaultRampManager(private val exchangeService: ExchangeService?) : RampStateManager {
|
||||
|
||||
private val cryptoCurrencyConverter = CryptoCurrencyConverter()
|
||||
override fun availableForBuy(cryptoCurrency: CryptoCurrency): Boolean {
|
||||
return exchangeService?.availableForBuy(
|
||||
currency = cryptoCurrencyConverter.convertBack(cryptoCurrency),
|
||||
) ?: false
|
||||
}
|
||||
|
||||
override fun availableForSell(cryptoCurrency: CryptoCurrency): Boolean {
|
||||
return exchangeService?.availableForSell(
|
||||
currency = cryptoCurrencyConverter.convertBack(cryptoCurrency),
|
||||
) ?: false
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue