From 10798c0ff37eef10fe30e543202004bd85dde55a Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 16 Apr 2024 16:28:48 +0100 Subject: [PATCH 1/3] Updated on 2026-08-14 --- app/src/main/assets/tangem-app-config | 2 +- .../wallet/presentation/wallet/domain/BackupValidator.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/assets/tangem-app-config b/app/src/main/assets/tangem-app-config index 980cc4cb2f..367aa6465e 160000 --- a/app/src/main/assets/tangem-app-config +++ b/app/src/main/assets/tangem-app-config @@ -1 +1 @@ -Subproject commit 980cc4cb2fb9ba44cd6798191ae7d208e4f7f74c +Subproject commit 367aa6465ec6ee7fdccce6cc7d7abeed5aad1111 diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/BackupValidator.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/BackupValidator.kt index caa4c9fd87..4153d69e68 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/BackupValidator.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/BackupValidator.kt @@ -37,6 +37,7 @@ class BackupValidator @Inject constructor() { private fun validateBackupStatus(cardDTO: CardDTO): Boolean { val backupStatus = cardDTO.backupStatus - return backupStatus != null && backupStatus !is CardDTO.BackupStatus.CardLinked + backupStatus ?: return true // for card with null backup status, validation should always returns true + return backupStatus !is CardDTO.BackupStatus.CardLinked } } \ No newline at end of file From c492f4b9d3bcc02226cb22b92f6fbb309980c5fd Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 16 Apr 2024 19:44:27 +0500 Subject: [PATCH 2/3] Updated on 2026-08-14 --- .../src/main/assets/configs/feature_toggles_config.json | 2 +- .../presentation/state/confirm/SendNotificationFactory.kt | 5 ++--- .../presentation/state/previewdata/SendClickIntentsStub.kt | 3 ++- .../send/impl/presentation/viewmodel/SendClickIntents.kt | 3 ++- .../send/impl/presentation/viewmodel/SendViewModel.kt | 6 ++++-- gradle/dependencies.toml | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/core/featuretoggles/src/main/assets/configs/feature_toggles_config.json b/core/featuretoggles/src/main/assets/configs/feature_toggles_config.json index 7a8e690d21..84088baede 100644 --- a/core/featuretoggles/src/main/assets/configs/feature_toggles_config.json +++ b/core/featuretoggles/src/main/assets/configs/feature_toggles_config.json @@ -9,7 +9,7 @@ }, { "name": "REDESIGNED_SEND_SCREEN_ENABLED", - "version": "undefined" + "version": "5.9.0" }, { "name": "GENERAL_USER_WALLETS_LIST_MANAGER_ENABLED", diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/confirm/SendNotificationFactory.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/confirm/SendNotificationFactory.kt index 68d334e0ae..0d147eb6fd 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/confirm/SendNotificationFactory.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/confirm/SendNotificationFactory.kt @@ -167,9 +167,8 @@ internal class SendNotificationFactory( cryptoCurrency = cryptoCurrency, ), onConfirmClick = { - val reduceTo = utxoLimit.maxAmount.toPlainString() clickIntents.onAmountReduceClick( - reduceTo, + utxoLimit.maxAmount, SendNotification.Error.TransactionLimitError::class.java, ) }, @@ -223,7 +222,7 @@ internal class SendNotificationFactory( SendNotification.Warning.HighFeeError( amount = threshold.toPlainString(), onConfirmClick = { - val reduceTo = sendAmount.minus(threshold).toPlainString() + val reduceTo = sendAmount.minus(threshold) clickIntents.onAmountReduceClick(reduceTo, SendNotification.Warning.HighFeeError::class.java) }, onCloseClick = { diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/previewdata/SendClickIntentsStub.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/previewdata/SendClickIntentsStub.kt index 67d5b07642..92be46efa2 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/previewdata/SendClickIntentsStub.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/previewdata/SendClickIntentsStub.kt @@ -6,6 +6,7 @@ import com.tangem.features.send.impl.presentation.analytics.EnterAddressSource import com.tangem.features.send.impl.presentation.state.SendNotification import com.tangem.features.send.impl.presentation.state.fee.FeeType import com.tangem.features.send.impl.presentation.viewmodel.SendClickIntents +import java.math.BigDecimal @Suppress("TooManyFunctions") internal object SendClickIntentsStub : SendClickIntents { @@ -57,7 +58,7 @@ internal object SendClickIntentsStub : SendClickIntents { override fun onShareClick() {} - override fun onAmountReduceClick(reducedAmount: String, clazz: Class) {} + override fun onAmountReduceClick(reducedAmount: BigDecimal, clazz: Class) {} override fun onNotificationCancel(clazz: Class) {} } \ No newline at end of file diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendClickIntents.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendClickIntents.kt index 14ed1562af..9db5547b20 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendClickIntents.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendClickIntents.kt @@ -5,6 +5,7 @@ import com.tangem.domain.wallets.models.UserWalletId import com.tangem.features.send.impl.presentation.analytics.EnterAddressSource import com.tangem.features.send.impl.presentation.state.SendNotification import com.tangem.features.send.impl.presentation.state.fee.FeeType +import java.math.BigDecimal @Suppress("TooManyFunctions") internal interface SendClickIntents { @@ -64,7 +65,7 @@ internal interface SendClickIntents { fun onShareClick() - fun onAmountReduceClick(reducedAmount: String, clazz: Class) + fun onAmountReduceClick(reducedAmount: BigDecimal, clazz: Class) fun onNotificationCancel(clazz: Class) // endregion diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendViewModel.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendViewModel.kt index 2a3112371e..2d397422cf 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendViewModel.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/viewmodel/SendViewModel.kt @@ -10,6 +10,7 @@ import arrow.core.getOrElse import com.tangem.blockchain.common.TransactionData import com.tangem.blockchain.common.transaction.TransactionFee import com.tangem.core.analytics.api.AnalyticsEventHandler +import com.tangem.core.ui.utils.parseBigDecimal import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase import com.tangem.domain.appcurrency.model.AppCurrency import com.tangem.domain.balancehiding.GetBalanceHidingSettingsUseCase @@ -58,6 +59,7 @@ import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.* import kotlinx.coroutines.flow.* import timber.log.Timber +import java.math.BigDecimal import java.util.Locale import javax.inject.Inject import kotlin.properties.Delegates @@ -785,8 +787,8 @@ internal class SendViewModel @Inject constructor( analyticsEventHandler.send(SendAnalyticEvents.ShareButtonClicked) } - override fun onAmountReduceClick(reducedAmount: String, clazz: Class) { - uiState = amountStateFactory.getOnAmountValueChange(reducedAmount) + override fun onAmountReduceClick(reducedAmount: BigDecimal, clazz: Class) { + uiState = amountStateFactory.getOnAmountValueChange(reducedAmount.parseBigDecimal(cryptoCurrency.decimals)) uiState = sendNotificationFactory.dismissNotificationState(clazz) } diff --git a/gradle/dependencies.toml b/gradle/dependencies.toml index 702d001217..48a3bcb3df 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -85,7 +85,7 @@ leakcanary = "2.13" # endregion Other libraries # region Tangem -tangemBlockchainSdk = "release-app_5.9-596" +tangemBlockchainSdk = "release-app_5.9-599" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "release-app_5.9-343" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ From b5079db1addd0ede402d2f0efe22323cec7e9504 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 16 Apr 2024 18:25:31 +0100 Subject: [PATCH 3/3] Updated on 2026-08-14 --- gradle/dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/dependencies.toml b/gradle/dependencies.toml index 48a3bcb3df..56d6351be9 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -85,7 +85,7 @@ leakcanary = "2.13" # endregion Other libraries # region Tangem -tangemBlockchainSdk = "release-app_5.9-599" +tangemBlockchainSdk = "release-app_5.9-600" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "release-app_5.9-343" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^