From a9dfa54eec9cbcb961a377c3593dc7313cb61c5e Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 4 Dec 2023 13:52:13 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../tokens/GetCryptoCurrencyActionsUseCase.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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))