Updated on 2026-08-14
This commit is contained in:
parent
d83a31a9b0
commit
042df9828f
16 changed files with 47 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ import com.tangem.core.decompose.model.Model
|
|||
import com.tangem.core.decompose.model.ParamsContainer
|
||||
import com.tangem.core.decompose.navigation.Router
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.domain.express.models.ExpressOperationType
|
||||
import com.tangem.domain.express.models.ExpressProviderType
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.models.currency.CryptoCurrencyStatus
|
||||
|
|
@ -293,6 +294,7 @@ internal class SendWithSwapConfirmModel @Inject constructor(
|
|||
}
|
||||
router.replaceAll(SendWithSwapRoute.Success)
|
||||
},
|
||||
expressOperationType = ExpressOperationType.SEND_WITH_SWAP,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.tangem.features.swap.v2.impl.sendviaswap.confirm.model
|
|||
import arrow.core.getOrElse
|
||||
import com.tangem.blockchain.common.transaction.Fee
|
||||
import com.tangem.domain.express.models.ExpressError
|
||||
import com.tangem.domain.express.models.ExpressOperationType
|
||||
import com.tangem.domain.express.models.ExpressProvider
|
||||
import com.tangem.domain.express.models.ExpressProviderType
|
||||
import com.tangem.domain.models.currency.CryptoCurrencyStatus
|
||||
|
|
@ -40,6 +41,7 @@ internal class SwapTransactionSender @AssistedInject constructor(
|
|||
onSendSuccess: (String, Long, SwapDataModel) -> Unit,
|
||||
onExpressError: (ExpressError) -> Unit,
|
||||
onSendError: (SendTransactionError?) -> Unit,
|
||||
expressOperationType: ExpressOperationType,
|
||||
) {
|
||||
val provider = confirmData.quote?.provider ?: return
|
||||
|
||||
|
|
@ -50,6 +52,7 @@ internal class SwapTransactionSender @AssistedInject constructor(
|
|||
onExpressError = onExpressError,
|
||||
onSendSuccess = onSendSuccess,
|
||||
onSendError = onSendError,
|
||||
expressOperationType = expressOperationType,
|
||||
)
|
||||
ExpressProviderType.DEX,
|
||||
ExpressProviderType.DEX_BRIDGE,
|
||||
|
|
@ -67,6 +70,7 @@ internal class SwapTransactionSender @AssistedInject constructor(
|
|||
onSendSuccess: (String, Long, SwapDataModel) -> Unit,
|
||||
onExpressError: (ExpressError) -> Unit,
|
||||
onSendError: (SendTransactionError?) -> Unit,
|
||||
expressOperationType: ExpressOperationType,
|
||||
) {
|
||||
val fromStatus = confirmData.fromCryptoCurrencyStatus ?: return
|
||||
val toStatus = confirmData.toCryptoCurrencyStatus ?: return
|
||||
|
|
@ -92,6 +96,7 @@ internal class SwapTransactionSender @AssistedInject constructor(
|
|||
toAddress = destination,
|
||||
expressProvider = provider,
|
||||
rateType = rateType,
|
||||
expressOperationType,
|
||||
).getOrElse { onExpressError(it); return }
|
||||
|
||||
createAndSendCexTransaction(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue