From 8f4e5ed3e066385bd3d3bf3b0640123c36cbde1c Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 21 Apr 2026 18:38:24 +0400 Subject: [PATCH] Updated on 2026-08-14 --- .../express/models/ExpressProviderType.kt | 2 +- .../feature/swap/domain/SwapInteractorImpl.kt | 26 +++++++++---------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/domain/express/models/src/main/java/com/tangem/domain/express/models/ExpressProviderType.kt b/domain/express/models/src/main/java/com/tangem/domain/express/models/ExpressProviderType.kt index 343c0bda7b..2974c8a2db 100644 --- a/domain/express/models/src/main/java/com/tangem/domain/express/models/ExpressProviderType.kt +++ b/domain/express/models/src/main/java/com/tangem/domain/express/models/ExpressProviderType.kt @@ -27,8 +27,8 @@ enum class ExpressProviderType(val typeName: String) { fun ExpressProviderType.shouldStoreSwapTransaction() = when (this) { CEX, DEX_BRIDGE, - -> true DEX, + -> true ONRAMP, -> false } 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 9365e7893f..5b2b9b002e 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 @@ -904,19 +904,17 @@ internal class SwapInteractorImpl @AssistedInject constructor( txHash = txHash, payInExtraId = swapData.transaction.txExtraId, ) - if (provider.type == ExchangeProviderType.DEX_BRIDGE) { - val timestamp = System.currentTimeMillis() - storeSwapTransaction( - currencyToSend = currencyToSendStatus, - currencyToGet = currencyToGetStatus, - fromAccount = fromAccount, - toAccount = toAccount, - amount = amount, - swapProvider = provider, - swapDataModel = swapData, - timestamp = timestamp, - ) - } + val timestamp = System.currentTimeMillis() + storeSwapTransaction( + currencyToSend = currencyToSendStatus, + currencyToGet = currencyToGetStatus, + fromAccount = fromAccount, + toAccount = toAccount, + amount = amount, + swapProvider = provider, + swapDataModel = swapData, + timestamp = timestamp, + ) storeLastCryptoCurrencyId(currencyToGetStatus.currency) SwapTransactionState.TxSent( fromAmount = amountFormatter.formatSwapAmountToUI( @@ -930,7 +928,7 @@ internal class SwapInteractorImpl @AssistedInject constructor( ), toAmountValue = swapData.toTokenAmount.value, txHash = txHash, - timestamp = System.currentTimeMillis(), + timestamp = timestamp, ) }, ifLeft = { SwapTransactionState.Error.TransactionError(it) },