Updated on 2026-08-14
This commit is contained in:
parent
1712785ec6
commit
c026d65fba
1 changed files with 0 additions and 28 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue