From c026d65fba49a50dc320c74dd1945f49d65ccb57 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 28 Nov 2023 12:08:19 +0200 Subject: [PATCH] Updated on 2026-08-14 --- .../feature/swap/domain/SwapInteractorImpl.kt | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt index 1f0095a373..15bcdad9af 100644 --- a/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt +++ b/features/swap/domain/src/main/java/com/tangem/feature/swap/domain/SwapInteractorImpl.kt @@ -459,11 +459,6 @@ internal class SwapInteractorImpl @Inject constructor( ) return when (result) { is SendTxResult.Success -> { - if (walletFeatureToggles.isRedesignedScreenEnabled) { - onSuccessNewFlow(currencyToGet) - } else { - onSuccessLegacyFlow(currencyToGet) - } TxState.TxSent( fromAmount = amountFormatter.formatSwapAmountToUI( amount, @@ -529,11 +524,6 @@ internal class SwapInteractorImpl @Inject constructor( } }, ifRight = { - if (walletFeatureToggles.isRedesignedScreenEnabled) { - onSuccessNewFlow(currencyToGet.currency) - } else { - onSuccessLegacyFlow(currencyToGet.currency) - } TxState.TxSent( fromAmount = amountFormatter.formatSwapAmountToUI( amount, @@ -568,24 +558,6 @@ internal class SwapInteractorImpl @Inject constructor( return ONE_INCH_SUPPORTED_NETWORKS.contains(networkId) } - @Deprecated("used in old swap mechanism") - private suspend fun onSuccessLegacyFlow(currency: CryptoCurrency) { - userWalletManager.addToken(swapCurrencyConverter.convert(currency), derivationPath) - userWalletManager.refreshWallet() - } - - @Deprecated("used in old swap mechanism") - private suspend fun onSuccessNewFlow(currency: CryptoCurrency) { - getSelectedWalletSyncUseCase().fold( - ifRight = { userWallet -> - addCryptoCurrenciesUseCase(userWallet.walletId, currency) - }, - ifLeft = { - Timber.e("Swap Error on getSelectedWalletUseCase") - }, - ) - } - @Deprecated("used in old swap mechanism") private fun getTangemFee(): Double { return repository.getTangemFee()