From 7ec835751e92ae8beb8abed91e92748f52485eb4 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 9 Feb 2026 14:56:39 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../network/ethereum/WcEthSendTransactionUseCase.kt | 7 ++++--- .../network/ethereum/WcEthSignTransactionUseCase.kt | 7 ++++--- gradle/tangem_dependencies.toml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/data/wallet-connect/src/main/kotlin/com/tangem/data/walletconnect/network/ethereum/WcEthSendTransactionUseCase.kt b/data/wallet-connect/src/main/kotlin/com/tangem/data/walletconnect/network/ethereum/WcEthSendTransactionUseCase.kt index 4b599ee4d7..0bee94b52c 100644 --- a/data/wallet-connect/src/main/kotlin/com/tangem/data/walletconnect/network/ethereum/WcEthSendTransactionUseCase.kt +++ b/data/wallet-connect/src/main/kotlin/com/tangem/data/walletconnect/network/ethereum/WcEthSendTransactionUseCase.kt @@ -107,15 +107,16 @@ internal class WcEthSendTransactionUseCase @AssistedInject constructor( val newState = when (action) { is WcEthTxAction.UpdateApprovalAmount -> { val extras = uncompiled.extras as EthereumTransactionExtras - val callData = ApprovalERC20TokenCallData( - spenderAddress = uncompiled.sourceAddress, + val compiledData = extras.callData?.data ?: return + val approvalCallData = ApprovalERC20TokenCallData(compiledData) ?: return + val newApprovalCallData = approvalCallData.copy( amount = action.amount?.amount?.let { BlockchainAmount(currencySymbol = it.currencySymbol, decimals = it.decimals, value = it.value) }, ) approvalAmount = action.amount isIgnoreDAppFee = true - uncompiled.copy(extras = extras.copy(callData = callData)) + uncompiled.copy(extras = extras.copy(callData = newApprovalCallData)) } is WcEthTxAction.UpdateFee -> uncompiled.copy(fee = action.fee) } diff --git a/data/wallet-connect/src/main/kotlin/com/tangem/data/walletconnect/network/ethereum/WcEthSignTransactionUseCase.kt b/data/wallet-connect/src/main/kotlin/com/tangem/data/walletconnect/network/ethereum/WcEthSignTransactionUseCase.kt index e71f37533d..f471d59ba8 100644 --- a/data/wallet-connect/src/main/kotlin/com/tangem/data/walletconnect/network/ethereum/WcEthSignTransactionUseCase.kt +++ b/data/wallet-connect/src/main/kotlin/com/tangem/data/walletconnect/network/ethereum/WcEthSignTransactionUseCase.kt @@ -92,15 +92,16 @@ internal class WcEthSignTransactionUseCase @AssistedInject constructor( val newState = when (action) { is WcEthTxAction.UpdateApprovalAmount -> { val extras = uncompiled.extras as EthereumTransactionExtras - val callData = ApprovalERC20TokenCallData( - spenderAddress = uncompiled.sourceAddress, + val compiledData = extras.callData?.data ?: return + val approvalCallData = ApprovalERC20TokenCallData(compiledData) ?: return + val newApprovalCallData = approvalCallData.copy( amount = action.amount?.amount?.let { BlockchainAmount(currencySymbol = it.currencySymbol, decimals = it.decimals, value = it.value) }, ) approvalAmount = action.amount isIgnoreDAppFee = true - uncompiled.copy(extras = extras.copy(callData = callData)) + uncompiled.copy(extras = extras.copy(callData = newApprovalCallData)) } is WcEthTxAction.UpdateFee -> uncompiled.copy(fee = action.fee) } diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 0758ec2945..d015ed0aba 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -5,7 +5,7 @@ # https://github.com/tangem/tangem-sdk-android/ # https://github.com/tangem/vico -tangemBlockchainSdk = "releases-5.33-1421" +tangemBlockchainSdk = "releases-5.33-1423" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "releases-5.33-576" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^