Updated on 2026-08-14

This commit is contained in:
Tangem 2023-06-06 18:44:07 +08:00
parent 3be414a6d0
commit 77170e7036
3 changed files with 1 additions and 12 deletions

View file

@ -77,12 +77,6 @@ sealed class Token(
class ButtonPaste : Send("Button - Paste")
class ButtonQRCode : Send("Button - QR Code")
class ButtonSwapCurrency : Send("Button - Swap Currency")
class TransactionSent(type: CurrencyType, error: Throwable? = null) : Send(
event = "Transaction Sent",
params = mapOf("Token" to type.value),
error = error,
)
}
sealed class Topup(

View file

@ -19,7 +19,6 @@ import com.tangem.domain.models.scan.CardDTO
import com.tangem.tap.*
import com.tangem.tap.common.analytics.events.AnalyticsParam
import com.tangem.tap.common.analytics.events.Basic
import com.tangem.tap.common.analytics.events.Token
import com.tangem.tap.common.extensions.*
import com.tangem.tap.common.redux.AppDialog
import com.tangem.tap.common.redux.AppState
@ -237,10 +236,8 @@ private fun sendTransaction(
dispatch(SendAction.ChangeSendButtonState(ButtonState.ENABLED))
tangemSdk.config.linkedTerminal = linkedTerminalState
val currencyType = AnalyticsParam.CurrencyType.Amount(amountToSend)
when (sendResult) {
is SimpleResult.Success -> {
Analytics.send(Token.Send.TransactionSent(currencyType))
dispatch(SendAction.SendSuccess)
if (externalTransactionData != null) {
@ -273,8 +270,6 @@ private fun sendTransaction(
)
val error = sendResult.error as? BlockchainSdkError ?: return@withMainContext
Analytics.send(Token.Send.TransactionSent(currencyType, error))
when (error) {
is BlockchainSdkError.WrappedTangemError -> {
val tangemSdkError = error.tangemError as? TangemSdkError ?: return@withMainContext

View file

@ -683,7 +683,7 @@ internal class SwapInteractorImpl @Inject constructor(
private const val ZERO_BALANCE = "0"
private const val DEFAULT_BLOCKCHAIN_INCH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
private const val INCREASE_FEE_TO_CHECK_ENOUGH_PERCENT = 1.0 // if need to increase fee when check isEnough
private const val INCREASE_GAS_LIMIT_BY = 125 // 25%
private const val INCREASE_GAS_LIMIT_BY = 112 // 12%
private const val USDT_SYMBOL = "USDT"
private const val USDC_SYMBOL = "USDC"
private const val INFINITY_SYMBOL = ""