diff --git a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCryptoCurrencyActionsUseCase.kt b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCryptoCurrencyActionsUseCase.kt index d5f89f57f5..ff04eae099 100644 --- a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCryptoCurrencyActionsUseCase.kt +++ b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCryptoCurrencyActionsUseCase.kt @@ -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))