Updated on 2026-08-14

This commit is contained in:
Tangem 2026-02-06 18:30:13 +03:00
parent 8deed07408
commit 54d476cadd
14 changed files with 78 additions and 15 deletions

View file

@ -16,6 +16,7 @@ import com.tangem.features.walletconnect.transaction.entity.common.WcTransaction
import com.tangem.features.walletconnect.transaction.entity.send.WcSendTransactionItemUM
import com.tangem.features.walletconnect.transaction.entity.send.WcSendTransactionUM
import com.tangem.features.walletconnect.utils.WcNotificationsFactory
import com.tangem.core.ui.HoldToConfirmButtonFeatureToggles
import com.tangem.domain.models.wallet.isHotWallet
import com.tangem.utils.converter.Converter
import kotlinx.collections.immutable.toImmutableList
@ -26,6 +27,7 @@ internal class WcSendTransactionUMConverter @Inject constructor(
private val networkInfoUMConverter: WcNetworkInfoUMConverter,
private val requestBlockUMConverter: WcTransactionRequestBlockUMConverter,
private val notificationsFactory: WcNotificationsFactory,
private val holdToConfirmButtonFeatureToggles: HoldToConfirmButtonFeatureToggles,
) : Converter<WcSendTransactionUMConverter.Input, WcSendTransactionUM?> {
override fun convert(value: Input): WcSendTransactionUM? {
@ -63,7 +65,8 @@ internal class WcSendTransactionUMConverter @Inject constructor(
}
},
feeErrorNotification = feeErrorNotification,
isHoldToConfirmEnabled = value.context.session.wallet.isHotWallet,
isHoldToConfirmEnabled = holdToConfirmButtonFeatureToggles.isHoldToConfirmEnabled &&
value.context.session.wallet.isHotWallet,
),
feeSelectorUM = when (value.feeState) {
WcTransactionFeeState.None -> FeeSelectorUM.Loading

View file

@ -10,6 +10,7 @@ import com.tangem.features.walletconnect.transaction.entity.common.WcTransaction
import com.tangem.features.walletconnect.transaction.entity.common.WcTransactionRequestInfoUM
import com.tangem.features.walletconnect.transaction.entity.sign.WcSignTransactionItemUM
import com.tangem.features.walletconnect.transaction.entity.sign.WcSignTransactionUM
import com.tangem.core.ui.HoldToConfirmButtonFeatureToggles
import com.tangem.domain.models.wallet.isHotWallet
import com.tangem.utils.converter.Converter
import kotlinx.collections.immutable.toImmutableList
@ -19,6 +20,7 @@ internal class WcSignTransactionUMConverter @Inject constructor(
private val appInfoContentUMConverter: WcTransactionAppInfoContentUMConverter,
private val networkInfoUMConverter: WcNetworkInfoUMConverter,
private val requestBlockUMConverter: WcTransactionRequestBlockUMConverter,
private val holdToConfirmButtonFeatureToggles: HoldToConfirmButtonFeatureToggles,
) : Converter<WcSignTransactionUMConverter.Input, WcSignTransactionUM> {
override fun convert(value: Input) = WcSignTransactionUM(
@ -36,7 +38,8 @@ internal class WcSignTransactionUMConverter @Inject constructor(
isLoading = value.signState.domainStep == WcSignStep.Signing,
address = WcAddressConverter.convert(value.context.derivationState),
walletInteractionIcon = walletInterationIcon(value.context.session.wallet),
isHoldToConfirmEnabled = value.context.session.wallet.isHotWallet,
isHoldToConfirmEnabled = holdToConfirmButtonFeatureToggles.isHoldToConfirmEnabled &&
value.context.session.wallet.isHotWallet,
),
transactionRequestInfo = WcTransactionRequestInfoUM(
requestBlockUMConverter.convert(

View file

@ -10,6 +10,7 @@ import com.tangem.features.walletconnect.transaction.entity.common.WcTransaction
import com.tangem.features.walletconnect.transaction.entity.common.WcTransactionRequestInfoUM
import com.tangem.features.walletconnect.transaction.entity.sign.WcSignTransactionItemUM
import com.tangem.features.walletconnect.transaction.entity.sign.WcSignTransactionUM
import com.tangem.core.ui.HoldToConfirmButtonFeatureToggles
import com.tangem.domain.models.wallet.isHotWallet
import com.tangem.utils.converter.Converter
import kotlinx.collections.immutable.toImmutableList
@ -19,6 +20,7 @@ internal class WcSignTypedDataUMConverter @Inject constructor(
private val appInfoContentUMConverter: WcTransactionAppInfoContentUMConverter,
private val networkInfoUMConverter: WcNetworkInfoUMConverter,
private val requestBlockUMConverter: WcTransactionRequestBlockUMConverter,
private val holdToConfirmButtonFeatureToggles: HoldToConfirmButtonFeatureToggles,
) : Converter<WcSignTypedDataUMConverter.Input, WcSignTransactionUM> {
override fun convert(value: Input): WcSignTransactionUM = WcSignTransactionUM(
@ -36,7 +38,8 @@ internal class WcSignTypedDataUMConverter @Inject constructor(
address = WcAddressConverter.convert(value.context.derivationState),
isLoading = value.signState.domainStep == WcSignStep.Signing,
walletInteractionIcon = walletInterationIcon(value.context.session.wallet),
isHoldToConfirmEnabled = value.context.session.wallet.isHotWallet,
isHoldToConfirmEnabled = holdToConfirmButtonFeatureToggles.isHoldToConfirmEnabled &&
value.context.session.wallet.isHotWallet,
),
transactionRequestInfo = WcTransactionRequestInfoUM(
blocks = buildList {