Updated on 2026-08-14

This commit is contained in:
Tangem 2023-12-04 13:52:13 +03:00
parent 215008cbae
commit a9dfa54eec

View file

@ -97,12 +97,8 @@ class GetCryptoCurrencyActionsUseCase(
// copy address
activeList.add(TokenActionsState.ActionState.CopyAddress(true))
// buy
if (rampManager.availableForBuy(cryptoCurrency)) {
activeList.add(TokenActionsState.ActionState.Buy(true))
} else {
disabledList.add(TokenActionsState.ActionState.Buy(false))
}
// receive
activeList.add(TokenActionsState.ActionState.Receive(true))
// send
if (isSendDisabled(cryptoCurrencyStatus = cryptoCurrencyStatus, coinStatus = coinStatus)) {
@ -111,9 +107,6 @@ class GetCryptoCurrencyActionsUseCase(
activeList.add(TokenActionsState.ActionState.Send(true))
}
// receive
activeList.add(TokenActionsState.ActionState.Receive(true))
// swap
if (marketCryptoCurrencyRepository.isExchangeable(userWalletId, cryptoCurrency.id)) {
activeList.add(TokenActionsState.ActionState.Swap(true))
@ -121,6 +114,13 @@ class GetCryptoCurrencyActionsUseCase(
disabledList.add(TokenActionsState.ActionState.Swap(false))
}
// buy
if (rampManager.availableForBuy(cryptoCurrency)) {
activeList.add(TokenActionsState.ActionState.Buy(true))
} else {
disabledList.add(TokenActionsState.ActionState.Buy(false))
}
// sell
if (rampManager.availableForSell(cryptoCurrency)) {
activeList.add(TokenActionsState.ActionState.Sell(true))