From bd9d87c24f0cffd7fd2f05a39513a4246c56dcc7 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 15 Apr 2025 16:56:23 +0500 Subject: [PATCH 01/12] Updated on 2026-08-14 --- .../features/send/impl/presentation/model/SendModel.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/model/SendModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/model/SendModel.kt index c161cea93a..aeb010b391 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/model/SendModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/model/SendModel.kt @@ -511,13 +511,13 @@ internal class SendModel @Inject constructor( when (currentState.type) { SendUiStateType.Fee, SendUiStateType.EditFee, - -> if (uiState.value.feeState?.isPrimaryButtonEnabled == false) return + -> if (uiState.value.getFeeState(isFromEdit)?.isPrimaryButtonEnabled == false) return SendUiStateType.Amount, SendUiStateType.EditAmount, - -> if (!uiState.value.amountState.isPrimaryButtonEnabled) return + -> if (!uiState.value.getAmountState(isFromEdit).isPrimaryButtonEnabled) return SendUiStateType.Recipient, SendUiStateType.EditRecipient, - -> if (uiState.value.recipientState?.isPrimaryButtonEnabled == false) return + -> if (uiState.value.getRecipientState(isFromEdit)?.isPrimaryButtonEnabled == false) return SendUiStateType.Send -> if (uiState.value.sendState?.isPrimaryButtonEnabled == false) return SendUiStateType.None -> return } From 7a071c2336234cc7da51f4bcd90714755ad84623 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 15 Apr 2025 13:47:18 +0000 Subject: [PATCH 02/12] Updated on 2026-08-14 --- gradle/tangem_dependencies.toml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 3ac68363ee..c6bc2129f5 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -1,9 +1,15 @@ [versions] -tangemBlockchainSdk = "releases-5.22-1016" +# Blockchain SDK, Card SDK and Vico artifacts are built in a private namespace and then published to a +# public Maven repository, so anyone can build the app from source +# https://github.com/tangem/blockchain-sdk-kotlin/packages/ +# https://github.com/tangem/tangem-sdk-android/ +# https://github.com/tangem/vico + +tangemBlockchainSdk = "releases-5.23-1026" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds -tangemCardSdk = "release-app_5.22-440" +tangemCardSdk = "releases-5.23-456" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ -tangemVico = "2.0.0-alpha.25-tangem-developments8" +tangemVico = "2.0.0-alpha.25-tangem12" #tangemVico = "0.0.1" # Keep it! - used for local builds ^ @@ -15,4 +21,4 @@ card-core = { module = "com.tangem.tangem-sdk-kotlin:core", version.ref = "tange vico-compose = { group = "com.tangem.vico", name = "compose", version.ref = "tangemVico" } vico-compose-m3 = { group = "com.tangem.vico", name = "compose-m3", version.ref = "tangemVico" } -vico-core = { group = "com.tangem.vico", name = "core", version.ref = "tangemVico" } \ No newline at end of file +vico-core = { group = "com.tangem.vico", name = "core", version.ref = "tangemVico" } From fac21a0c25deadbf5df5c0882de952bc0fb8f204 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 15 Apr 2025 19:22:32 +0500 Subject: [PATCH 03/12] Updated on 2026-08-14 --- .../destination/model/SendDestinationModel.kt | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt index 14f2d7a777..510030607b 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/destination/model/SendDestinationModel.kt @@ -79,22 +79,11 @@ internal class SendDestinationModel @Inject constructor( private var validationJobHolder = JobHolder() init { - initSenderAddress() configDestinationNavigation() subscribeOnQRScannerResult() initialState() } - private fun initSenderAddress() { - modelScope.launch { - senderAddresses.value = getNetworkAddressesUseCase.invokeSync(userWalletId, cryptoCurrency.network) - .filter { cryptoCurrency.id == it.cryptoCurrency.id } - } - senderAddresses.onEach { - getWalletsAndRecent() - }.launchIn(modelScope) - } - private fun initialState() { if ((uiState.value as? DestinationUM.Content)?.isInitialized == false) { _uiState.update( @@ -112,6 +101,7 @@ internal class SendDestinationModel @Inject constructor( ), ) } + initSenderAddress() } } @@ -150,6 +140,16 @@ internal class SendDestinationModel @Inject constructor( ) } + private fun initSenderAddress() { + modelScope.launch { + senderAddresses.value = getNetworkAddressesUseCase.invokeSync(userWalletId, cryptoCurrency.network) + .filter { cryptoCurrency.id == it.cryptoCurrency.id } + } + senderAddresses.onEach { + getWalletsAndRecent() + }.launchIn(modelScope) + } + private fun subscribeOnQRScannerResult() { listenToQrScanningUseCase(SourceType.SEND) .getOrElse { emptyFlow() } From c6da35bb66771f330e66cc253e0bb46a57da2a16 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 15 Apr 2025 19:22:37 +0500 Subject: [PATCH 04/12] Updated on 2026-08-14 --- .../usecase/GetExplorerTransactionUrlUseCase.kt | 14 -------------- .../send/v2/send/confirm/model/SendConfirmModel.kt | 6 +++--- .../send/impl/presentation/model/SendModel.kt | 6 +++--- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/domain/txhistory/src/main/kotlin/com/tangem/domain/txhistory/usecase/GetExplorerTransactionUrlUseCase.kt b/domain/txhistory/src/main/kotlin/com/tangem/domain/txhistory/usecase/GetExplorerTransactionUrlUseCase.kt index 991475bef2..974d439c7e 100644 --- a/domain/txhistory/src/main/kotlin/com/tangem/domain/txhistory/usecase/GetExplorerTransactionUrlUseCase.kt +++ b/domain/txhistory/src/main/kotlin/com/tangem/domain/txhistory/usecase/GetExplorerTransactionUrlUseCase.kt @@ -6,7 +6,6 @@ import arrow.core.raise.either import com.tangem.domain.tokens.model.Network import com.tangem.domain.txhistory.models.TxStatusError import com.tangem.domain.txhistory.repository.TxHistoryRepository -import com.tangem.domain.wallets.models.UserWalletId class GetExplorerTransactionUrlUseCase( private val repository: TxHistoryRepository, @@ -23,17 +22,4 @@ class GetExplorerTransactionUrlUseCase( ) } } - - suspend operator fun invoke(userWalletId: UserWalletId, network: Network): Either { - return either { - catch( - block = { - repository.getTxExploreUrl(userWalletId, network).ifEmpty { - raise(TxStatusError.EmptyUrlError) - } - }, - catch = { raise(TxStatusError.DataError(it)) }, - ) - } - } } \ No newline at end of file diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt index 9d8f6b0816..cfd1b22477 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/confirm/model/SendConfirmModel.kt @@ -395,10 +395,10 @@ internal class SendConfirmModel @Inject constructor( } } - private suspend fun updateTransactionStatus(txData: TransactionData.Uncompiled) { + private fun updateTransactionStatus(txData: TransactionData.Uncompiled) { val txUrl = getExplorerTransactionUrlUseCase( - userWalletId = userWallet.walletId, - network = cryptoCurrency.network, + txHash = txData.hash.orEmpty(), + networkId = cryptoCurrency.network.id, ).getOrElse { "" } _uiState.update(SendConfirmSentStateTransformer(txData, txUrl)) } diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/model/SendModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/model/SendModel.kt index 7e925c3dcf..9f4e696e39 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/model/SendModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/model/SendModel.kt @@ -995,10 +995,10 @@ internal class SendModel @Inject constructor( } } - private suspend fun updateTransactionStatus(txData: TransactionData.Uncompiled) { + private fun updateTransactionStatus(txData: TransactionData.Uncompiled) { val txUrl = getExplorerTransactionUrlUseCase( - userWalletId = userWalletId, - network = cryptoCurrency.network, + txHash = txData.hash.orEmpty(), + networkId = cryptoCurrency.network.id, ).getOrElse { "" } uiState.value = stateFactory.getTransactionSendState(txData, txUrl) } From 586158fe8e9d22ff4d147096c0e6ab6a9343981f Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 15 Apr 2025 19:22:54 +0500 Subject: [PATCH 05/12] Updated on 2026-08-14 --- .../amount/model/SendAmountModel.kt | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt index ce05dce8b0..67bac1cf20 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt @@ -1,6 +1,7 @@ package com.tangem.features.send.v2.subcomponents.amount.model import androidx.compose.runtime.Stable +import com.tangem.common.routing.AppRouter import com.tangem.common.ui.amountScreen.AmountScreenClickIntents import com.tangem.common.ui.amountScreen.converters.* import com.tangem.common.ui.amountScreen.converters.field.AmountFieldChangeTransformer @@ -21,6 +22,8 @@ import com.tangem.domain.tokens.GetMinimumTransactionAmountSyncUseCase import com.tangem.features.send.v2.common.NavigationUM import com.tangem.features.send.v2.impl.R import com.tangem.features.send.v2.send.SendRoute +import com.tangem.features.send.v2.send.analytics.SendAnalyticEvents +import com.tangem.features.send.v2.send.analytics.SendAnalyticEvents.SendScreenSource import com.tangem.features.send.v2.send.ui.state.ButtonsUM import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponentParams import com.tangem.features.send.v2.subcomponents.amount.SendAmountReduceListener @@ -43,6 +46,7 @@ internal class SendAmountModel @Inject constructor( paramsContainer: ParamsContainer, override val dispatchers: CoroutineDispatcherProvider, private val router: Router, + private val appRouter: AppRouter, private val getMinimumTransactionAmountSyncUseCase: GetMinimumTransactionAmountSyncUseCase, private val sendAmountReduceListener: SendAmountReduceListener, private val feeReloadTrigger: SendFeeReloadTrigger, @@ -227,12 +231,24 @@ internal class SendAmountModel @Inject constructor( NavigationUM.Content( title = resourceReference(R.string.send_amount_label), subtitle = null, - backIconRes = R.drawable.ic_back_24, + backIconRes = if (route.isEditMode) { + R.drawable.ic_back_24 + } else { + R.drawable.ic_close_24 + }, backIconClick = { - if (!route.isEditMode) { - saveResult() + if (route.isEditMode) { + router.pop() + } else { + analyticsEventHandler.send( + SendAnalyticEvents.CloseButtonClicked( + source = SendScreenSource.Amount, + isFromSummary = false, + isValid = state.isPrimaryButtonEnabled, + ), + ) + appRouter.pop() } - router.pop() }, primaryButton = ButtonsUM.PrimaryButtonUM( text = if (route.isEditMode) { From 81d8760fca140a44fe8e8bdbd87d5384093ce4d4 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 15 Apr 2025 19:48:35 +0500 Subject: [PATCH 06/12] Updated on 2026-08-14 --- .../domain/demo/DemoTransactionSender.kt | 36 ++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/domain/demo/src/main/java/com/tangem/domain/demo/DemoTransactionSender.kt b/domain/demo/src/main/java/com/tangem/domain/demo/DemoTransactionSender.kt index 81a09ca897..5c667f1f53 100644 --- a/domain/demo/src/main/java/com/tangem/domain/demo/DemoTransactionSender.kt +++ b/domain/demo/src/main/java/com/tangem/domain/demo/DemoTransactionSender.kt @@ -7,6 +7,8 @@ import com.tangem.blockchain.common.transaction.TransactionSendResult import com.tangem.blockchain.common.transaction.TransactionsSendResult import com.tangem.blockchain.extensions.Result import com.tangem.common.CompletionResult +import java.math.BigDecimal +import java.math.BigInteger import kotlin.random.Random class DemoTransactionSender(private val walletManager: WalletManager) : TransactionSender { @@ -15,9 +17,9 @@ class DemoTransactionSender(private val walletManager: WalletManager) : Transact val blockchain = walletManager.wallet.blockchain return Result.Success( TransactionFee.Choosable( - minimum = Fee.Common(Amount(minimumFee, blockchain)), - normal = Fee.Common(Amount(normalFee, blockchain)), - priority = Fee.Common(Amount(priorityFee, blockchain)), + minimum = blockchain.getStubFee(minimumFee), + normal = blockchain.getStubFee(normalFee), + priority = blockchain.getStubFee(priorityFee), ), ) } @@ -44,7 +46,16 @@ class DemoTransactionSender(private val walletManager: WalletManager) : Transact transactionDataList: List, signer: TransactionSigner, sendMode: TransactionSender.MultipleTransactionSendMode, - ): Result = Result.Failure(Exception(ID).toBlockchainSdkError()) + ): Result { + val signerResponse = signer.sign( + hash = getDataToSign(), + publicKey = walletManager.wallet.publicKey, + ) + return when (signerResponse) { + is CompletionResult.Success -> Result.Failure(Exception(ID).toBlockchainSdkError()) + is CompletionResult.Failure -> Result.fromTangemSdkError(signerResponse.error) + } + } private fun getDataToSign(): ByteArray { val charPool: List = ('a'..'z') + ('A'..'Z') + ('0'..'9') @@ -55,6 +66,23 @@ class DemoTransactionSender(private val walletManager: WalletManager) : Transact .toByteArray() } + private fun Blockchain.getStubFee(fee: BigDecimal) = when (this) { + Blockchain.Ethereum -> Fee.Ethereum.EIP1559( + amount = Amount(fee, this), + gasLimit = BigInteger.ONE, + maxFeePerGas = BigInteger.ONE, + priorityFee = BigInteger.ONE, + ) + Blockchain.Dogecoin, + Blockchain.Bitcoin, + -> Fee.Bitcoin( + amount = Amount(fee, this), + satoshiPerByte = BigDecimal.ONE, + txSize = BigDecimal.ONE, + ) + else -> Fee.Common(Amount(normalFee, this)) + } + companion object { val ID: String = DemoTransactionSender::class.java.simpleName From a6da708704f048146ac748b8044a87b7f6e01da7 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 15 Apr 2025 20:21:52 +0500 Subject: [PATCH 07/12] Updated on 2026-08-14 --- .../core/ui/utils/RequestPushPermission.kt | 30 +++++++------------ .../ui/PushNotificationsScreen.kt | 3 -- .../PushNotificationsBottomSheet.kt | 7 ++--- 3 files changed, 13 insertions(+), 27 deletions(-) diff --git a/core/ui/src/main/java/com/tangem/core/ui/utils/RequestPushPermission.kt b/core/ui/src/main/java/com/tangem/core/ui/utils/RequestPushPermission.kt index f70452b5f7..4f6cc6d0df 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/utils/RequestPushPermission.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/utils/RequestPushPermission.kt @@ -1,9 +1,7 @@ package com.tangem.core.ui.utils import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect import com.google.accompanist.permissions.ExperimentalPermissionsApi -import com.google.accompanist.permissions.isGranted import com.google.accompanist.permissions.rememberPermissionState /** @@ -13,24 +11,18 @@ import com.google.accompanist.permissions.rememberPermissionState @Suppress("LongParameterList") @OptIn(ExperimentalPermissionsApi::class) @Composable -fun requestPushPermission( - pushPermission: String?, - isClicked: Boolean, - onAllow: () -> Unit, - onDeny: () -> Unit, -): () -> Unit { +fun requestPushPermission(pushPermission: String?, onAllow: () -> Unit, onDeny: () -> Unit): () -> Unit { val permissionState = pushPermission?.let { permission -> - rememberPermissionState(permission = permission) - } - - // Check if user granted permission and close bottom sheet - LaunchedEffect(key1 = permissionState?.status, isClicked) { - if (!isClicked) return@LaunchedEffect - if (permissionState?.status?.isGranted == true) { - onAllow() - } else { - onDeny() - } + rememberPermissionState( + permission = permission, + onPermissionResult = { isGranted -> + if (isGranted) { + onAllow() + } else { + onDeny() + } + }, + ) } return if (permissionState == null) { diff --git a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsScreen.kt b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsScreen.kt index 01d07a68ab..76d8ea97f8 100644 --- a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsScreen.kt +++ b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsScreen.kt @@ -19,9 +19,7 @@ internal fun PushNotificationsScreen( onAllowPermission: () -> Unit, onDenyPermission: () -> Unit, ) { - var isClicked by remember { mutableStateOf(false) } val requestPushPermission = requestPushPermission( - isClicked = isClicked, onAllow = onAllowPermission, onDeny = onDenyPermission, pushPermission = getPushPermissionOrNull(), @@ -43,7 +41,6 @@ internal fun PushNotificationsScreen( primaryButton = ShowcaseButtonModel( buttonText = resourceReference(R.string.common_allow), onClick = { - isClicked = true onRequest() requestPushPermission() }, diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/PushNotificationsBottomSheet.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/PushNotificationsBottomSheet.kt index 67fec39547..e61ceddcbf 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/PushNotificationsBottomSheet.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/PushNotificationsBottomSheet.kt @@ -6,13 +6,13 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.padding -import androidx.compose.runtime.* +import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import com.tangem.core.ui.components.PrimaryButton import com.tangem.core.ui.components.SecondaryButton -import com.tangem.core.ui.components.bottomsheets.sheet.TangemBottomSheet import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfig +import com.tangem.core.ui.components.bottomsheets.sheet.TangemBottomSheet import com.tangem.core.ui.components.showcase.ShowcaseContent import com.tangem.core.ui.components.showcase.model.ShowcaseItemModel import com.tangem.core.ui.extensions.resourceReference @@ -34,10 +34,8 @@ internal fun PushNotificationsBottomSheet(config: TangemBottomSheetConfig) { @Composable private fun PushNotificationsSheetContent(content: PushNotificationsBottomSheetConfig, onDismiss: () -> Unit) { - var isClicked by remember { mutableStateOf(false) } val requestPushPermission = requestPushPermission( pushPermission = getPushPermissionOrNull(), - isClicked = isClicked, onAllow = { content.onAllow() onDismiss() @@ -84,7 +82,6 @@ private fun PushNotificationsSheetContent(content: PushNotificationsBottomSheetC PrimaryButton( text = stringResourceSafe(R.string.common_allow), onClick = { - isClicked = true content.onRequest() requestPushPermission() }, From 27686aad7c8694aea7e537a810d0806649c866f2 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 16 Apr 2025 07:26:36 +0000 Subject: [PATCH 08/12] Updated on 2026-08-14 --- gradle/tangem_dependencies.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index c6bc2129f5..a32c8679a0 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -5,9 +5,9 @@ # https://github.com/tangem/tangem-sdk-android/ # https://github.com/tangem/vico -tangemBlockchainSdk = "releases-5.23-1026" +tangemBlockchainSdk = "develop-1027" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds -tangemCardSdk = "releases-5.23-456" +tangemCardSdk = "develop-455" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ tangemVico = "2.0.0-alpha.25-tangem12" #tangemVico = "0.0.1" # Keep it! - used for local builds ^ @@ -21,4 +21,4 @@ card-core = { module = "com.tangem.tangem-sdk-kotlin:core", version.ref = "tange vico-compose = { group = "com.tangem.vico", name = "compose", version.ref = "tangemVico" } vico-compose-m3 = { group = "com.tangem.vico", name = "compose-m3", version.ref = "tangemVico" } -vico-core = { group = "com.tangem.vico", name = "core", version.ref = "tangemVico" } +vico-core = { group = "com.tangem.vico", name = "core", version.ref = "tangemVico" } \ No newline at end of file From c40b743a4fe69ce121afb8d1a06950e6d3cdfbf9 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 15 Apr 2025 17:20:33 +0300 Subject: [PATCH 09/12] Updated on 2026-08-14 --- .../domain/WcSessionRequestConverter.kt | 11 +++-------- gradle/tangem_dependencies.toml | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/tangem/tap/domain/walletconnect2/domain/WcSessionRequestConverter.kt b/app/src/main/java/com/tangem/tap/domain/walletconnect2/domain/WcSessionRequestConverter.kt index 16eaf90e60..90de1f8b12 100644 --- a/app/src/main/java/com/tangem/tap/domain/walletconnect2/domain/WcSessionRequestConverter.kt +++ b/app/src/main/java/com/tangem/tap/domain/walletconnect2/domain/WcSessionRequestConverter.kt @@ -1,5 +1,6 @@ package com.tangem.tap.domain.walletconnect2.domain +import com.tangem.blockchain.blockchains.solana.SolanaTransactionHelper import com.tangem.domain.walletconnect.model.legacy.WalletConnectSessionsRepository import com.tangem.tap.domain.walletconnect.WalletConnectSdkHelper import com.tangem.tap.domain.walletconnect2.domain.models.BnbData @@ -150,10 +151,8 @@ internal class WcSessionRequestConverter( * Input transaction in Base64 string */ private fun String.prepareSolanaTransaction(): ByteArray { - return this.decodeBase64() - ?.toByteArray() - ?.drop(SOLANA_SIGNATURE_PLACEHOLDER_LENGTH) - ?.toByteArray() ?: ByteArray(0) + val transaction = this.decodeBase64()?.toByteArray() ?: ByteArray(0) + return SolanaTransactionHelper.removeSignaturesPlaceholders(transaction) } private fun getWalletAddress(request: WcRequest): String? { @@ -182,8 +181,4 @@ internal class WcSessionRequestConverter( (walletAddress == null || it.walletAddress.lowercase() == walletAddress.lowercase()) }?.derivationPath } - - companion object { - private const val SOLANA_SIGNATURE_PLACEHOLDER_LENGTH = 65 - } } \ No newline at end of file diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index c6bc2129f5..42f5de2a7f 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.23-1026" +tangemBlockchainSdk = "releases-5.23-1032" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "releases-5.23-456" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ From 155ade9512e090495d7b6015e12c8114d774c9ac Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 16 Apr 2025 07:30:49 +0000 Subject: [PATCH 10/12] Updated on 2026-08-14 --- gradle/tangem_dependencies.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 42f5de2a7f..a32c8679a0 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -5,9 +5,9 @@ # https://github.com/tangem/tangem-sdk-android/ # https://github.com/tangem/vico -tangemBlockchainSdk = "releases-5.23-1032" +tangemBlockchainSdk = "develop-1027" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds -tangemCardSdk = "releases-5.23-456" +tangemCardSdk = "develop-455" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ tangemVico = "2.0.0-alpha.25-tangem12" #tangemVico = "0.0.1" # Keep it! - used for local builds ^ @@ -21,4 +21,4 @@ card-core = { module = "com.tangem.tangem-sdk-kotlin:core", version.ref = "tange vico-compose = { group = "com.tangem.vico", name = "compose", version.ref = "tangemVico" } vico-compose-m3 = { group = "com.tangem.vico", name = "compose-m3", version.ref = "tangemVico" } -vico-core = { group = "com.tangem.vico", name = "core", version.ref = "tangemVico" } +vico-core = { group = "com.tangem.vico", name = "core", version.ref = "tangemVico" } \ No newline at end of file From 681849abad1f6cd19ef955e3e8b5ab79ace888c9 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 16 Apr 2025 10:42:13 +0300 Subject: [PATCH 11/12] Updated on 2026-08-14 --- gradle/tangem_dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index a32c8679a0..7698d4b61b 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 = "develop-1027" +tangemBlockchainSdk = "develop-1033" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "develop-455" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ From b48bb8236c5fa4c740e774d3a9ee9d27a6fb2460 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 16 Apr 2025 11:03:35 +0300 Subject: [PATCH 12/12] Updated on 2026-08-14 --- .../send/v2/send/DefaultSendComponent.kt | 16 +++++++++++++++- .../amount/model/SendAmountModel.kt | 1 - 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/DefaultSendComponent.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/DefaultSendComponent.kt index 1f12ff1fdd..645441fe6e 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/DefaultSendComponent.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/send/DefaultSendComponent.kt @@ -24,6 +24,7 @@ import com.tangem.features.send.v2.common.PredefinedValues import com.tangem.features.send.v2.common.ui.SendContent import com.tangem.features.send.v2.common.ui.state.ConfirmUM import com.tangem.features.send.v2.send.analytics.SendAnalyticEvents +import com.tangem.features.send.v2.send.analytics.SendAnalyticEvents.SendScreenSource import com.tangem.features.send.v2.send.confirm.SendConfirmComponent import com.tangem.features.send.v2.send.model.SendModel import com.tangem.features.send.v2.subcomponents.amount.SendAmountComponent @@ -161,7 +162,20 @@ internal class DefaultSendComponent @AssistedInject constructor( cryptoCurrencyStatus = model.cryptoCurrencyStatus, callback = model, predefinedValues = model.predefinedValues, - onBackClick = ::onChildBack, + onBackClick = { + if (route.isEditMode) { + onChildBack() + } else { + analyticsEventHandler.send( + SendAnalyticEvents.CloseButtonClicked( + source = SendScreenSource.Amount, + isFromSummary = false, + isValid = model.uiState.value.amountUM.isPrimaryButtonEnabled, + ), + ) + router.pop() + } + }, onNextClick = { if (route.isEditMode) { onChildBack() diff --git a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt index 60a02b2bcb..7e82ea275e 100644 --- a/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt +++ b/features/send-v2/impl/src/main/java/com/tangem/features/send/v2/subcomponents/amount/model/SendAmountModel.kt @@ -1,7 +1,6 @@ package com.tangem.features.send.v2.subcomponents.amount.model import androidx.compose.runtime.Stable -import com.tangem.common.routing.AppRouter import com.tangem.common.ui.amountScreen.AmountScreenClickIntents import com.tangem.common.ui.amountScreen.converters.* import com.tangem.common.ui.amountScreen.converters.field.AmountFieldChangeTransformer