Updated on 2026-08-14

This commit is contained in:
Tangem 2023-10-16 17:03:40 +03:00
parent 085f298798
commit b8b6166a5a

View file

@ -81,9 +81,7 @@ class GetCryptoCurrencyActionsUseCase(
activeList.add(TokenActionsState.ActionState.Receive(true))
// swap
if (marketCryptoCurrencyRepository.isExchangeable(userWalletId, cryptoCurrency.id) &&
!isCustomToken(cryptoCurrency)
) {
if (marketCryptoCurrencyRepository.isExchangeable(userWalletId, cryptoCurrency.id)) {
activeList.add(TokenActionsState.ActionState.Swap(true))
} else {
disabledList.add(TokenActionsState.ActionState.Swap(false))
@ -101,8 +99,4 @@ class GetCryptoCurrencyActionsUseCase(
return activeList + disabledList
}
private fun isCustomToken(currency: CryptoCurrency): Boolean {
return currency is CryptoCurrency.Token && currency.isCustom
}
}