Updated on 2026-08-14

This commit is contained in:
Tangem 2026-04-21 18:38:24 +04:00
parent fabd706b12
commit 8f4e5ed3e0
2 changed files with 13 additions and 15 deletions

View file

@ -27,8 +27,8 @@ enum class ExpressProviderType(val typeName: String) {
fun ExpressProviderType.shouldStoreSwapTransaction() = when (this) {
CEX,
DEX_BRIDGE,
-> true
DEX,
-> true
ONRAMP,
-> false
}

View file

@ -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) },