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) { fun ExpressProviderType.shouldStoreSwapTransaction() = when (this) {
CEX, CEX,
DEX_BRIDGE, DEX_BRIDGE,
-> true
DEX, DEX,
-> true
ONRAMP, ONRAMP,
-> false -> false
} }

View file

@ -904,19 +904,17 @@ internal class SwapInteractorImpl @AssistedInject constructor(
txHash = txHash, txHash = txHash,
payInExtraId = swapData.transaction.txExtraId, payInExtraId = swapData.transaction.txExtraId,
) )
if (provider.type == ExchangeProviderType.DEX_BRIDGE) { val timestamp = System.currentTimeMillis()
val timestamp = System.currentTimeMillis() storeSwapTransaction(
storeSwapTransaction( currencyToSend = currencyToSendStatus,
currencyToSend = currencyToSendStatus, currencyToGet = currencyToGetStatus,
currencyToGet = currencyToGetStatus, fromAccount = fromAccount,
fromAccount = fromAccount, toAccount = toAccount,
toAccount = toAccount, amount = amount,
amount = amount, swapProvider = provider,
swapProvider = provider, swapDataModel = swapData,
swapDataModel = swapData, timestamp = timestamp,
timestamp = timestamp, )
)
}
storeLastCryptoCurrencyId(currencyToGetStatus.currency) storeLastCryptoCurrencyId(currencyToGetStatus.currency)
SwapTransactionState.TxSent( SwapTransactionState.TxSent(
fromAmount = amountFormatter.formatSwapAmountToUI( fromAmount = amountFormatter.formatSwapAmountToUI(
@ -930,7 +928,7 @@ internal class SwapInteractorImpl @AssistedInject constructor(
), ),
toAmountValue = swapData.toTokenAmount.value, toAmountValue = swapData.toTokenAmount.value,
txHash = txHash, txHash = txHash,
timestamp = System.currentTimeMillis(), timestamp = timestamp,
) )
}, },
ifLeft = { SwapTransactionState.Error.TransactionError(it) }, ifLeft = { SwapTransactionState.Error.TransactionError(it) },