From ed73d3b5d78ca4d0dcd8d367dcdc7b6d762fe458 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 28 May 2024 14:54:34 +0100 Subject: [PATCH 01/14] Updated on 2026-08-14 --- core/res/src/main/res/values/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/res/src/main/res/values/strings.xml b/core/res/src/main/res/values/strings.xml index b08722ddd9..6e05b58c84 100644 --- a/core/res/src/main/res/values/strings.xml +++ b/core/res/src/main/res/values/strings.xml @@ -32,7 +32,7 @@ If system is selected, the app will auto-adjust based on your device\'s system settings System Theme - App Settings + App settings To hide or show your balances, simply flip your device screen down, or switch it off in Settings Don\'t show again Got it @@ -55,7 +55,7 @@ Access code will be changed on this card only Reset to Factory Settings Security Mode - Card Settings + Card settings Due to the peculiarities of the Cardano network, when transacting the %1$s token, in addition to the network commission, %2$s will be charged To make a %1$s transaction, you must deposit some %2$s (%3$s) to cover the network fee and minimum ADA value Insufficient ADA to token transfer @@ -179,7 +179,7 @@ Flip your device screen down to quickly hide and show balances %s hashes Card ID - Contact to Support + Contact support Link More Cards App Currency Flip-to-Hide Balances @@ -188,7 +188,7 @@ If you forget the code you will lose access to your funds. Code recovery is not possible. Details Check your internet connection or switch to a different network - Terms of Service + Terms of service You have used a card from another wallet. Tap the card associated with this wallet My tokens You haven\'t added any tokens yet. Add tokens via Market to swap From 43d24ce7906a51222524c34dbdb976f307a83aa2 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 28 May 2024 20:49:52 +0100 Subject: [PATCH 02/14] Updated on 2026-08-14 --- .../src/main/java/com/tangem/core/analytics/Analytics.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/analytics/src/main/java/com/tangem/core/analytics/Analytics.kt b/core/analytics/src/main/java/com/tangem/core/analytics/Analytics.kt index 790de00ea3..239573bed5 100644 --- a/core/analytics/src/main/java/com/tangem/core/analytics/Analytics.kt +++ b/core/analytics/src/main/java/com/tangem/core/analytics/Analytics.kt @@ -6,6 +6,7 @@ import com.tangem.utils.coroutines.FeatureCoroutineExceptionHandler import kotlinx.coroutines.* import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock +import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.Executors /** @@ -22,7 +23,7 @@ object Analytics : GlobalAnalyticsEventHandler { private val analyticsScope: CoroutineScope by lazy { createScope() } private val handlers = mutableMapOf() - private val paramsInterceptors = mutableMapOf() + private val paramsInterceptors = ConcurrentHashMap() private val analyticsFilters = mutableSetOf() private val analyticsMutex = Mutex() From 088ec5cc10b145c7c058fc73fd750b784dc6193a Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 3 Jun 2024 14:15:15 +0100 Subject: [PATCH 03/14] 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 f7ce17b6c2..a7d306c92d 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -88,7 +88,7 @@ markdown = "0.7.2" # region Tangem tangemBlockchainSdk = "release-app_5.10-639" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds -tangemCardSdk = "release-app_5.10-353" +tangemCardSdk = "release-app_5.10-363" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ # endregion Tangem From 9965745779e2601059143caba639b5aa41a4dbb8 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 3 Jun 2024 15:26:23 +0100 Subject: [PATCH 04/14] Updated on 2026-08-14 --- .../com/tangem/feature/swap/domain/models/SwapAmount.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/features/swap/domain/models/src/main/java/com/tangem/feature/swap/domain/models/SwapAmount.kt b/features/swap/domain/models/src/main/java/com/tangem/feature/swap/domain/models/SwapAmount.kt index c37e6fbc96..4b451b4dc3 100644 --- a/features/swap/domain/models/src/main/java/com/tangem/feature/swap/domain/models/SwapAmount.kt +++ b/features/swap/domain/models/src/main/java/com/tangem/feature/swap/domain/models/SwapAmount.kt @@ -2,6 +2,7 @@ package com.tangem.feature.swap.domain.models import com.tangem.utils.toFormattedString import java.math.BigDecimal +import java.math.RoundingMode data class SwapAmount( val value: BigDecimal, @@ -39,10 +40,5 @@ fun createFromAmountWithOffset(amountWithOffset: String, decimals: Int): SwapAmo @Throws(IllegalStateException::class) fun SwapAmount.toStringWithRightOffset(): String { - return value.movePointRight(decimals).toPlainString() -} - -@Throws(IllegalStateException::class) -fun SwapAmount.toStringWithLeftOffset(): String { - return value.movePointLeft(decimals).toPlainString() + return value.setScale(decimals, RoundingMode.HALF_DOWN).movePointRight(decimals).toPlainString() } \ No newline at end of file From 6e0ca6f09d3e8d006585906cb49b4055295a7084 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 3 Jun 2024 18:24:19 +0500 Subject: [PATCH 05/14] Updated on 2026-08-14 --- .../state/recipient/SendRecipientHistoryListConverter.kt | 4 +++- .../send/impl/presentation/viewmodel/SendViewModel.kt | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/recipient/SendRecipientHistoryListConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/recipient/SendRecipientHistoryListConverter.kt index 3b555a7e21..8a8576775e 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/recipient/SendRecipientHistoryListConverter.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/recipient/SendRecipientHistoryListConverter.kt @@ -1,5 +1,6 @@ package com.tangem.features.send.impl.presentation.state.recipient +import com.tangem.common.extensions.isZero import com.tangem.core.ui.extensions.TextReference import com.tangem.core.ui.extensions.stringReference import com.tangem.core.ui.extensions.wrappedList @@ -39,7 +40,8 @@ internal class SendRecipientHistoryListConverter( } else { item.sourceType is TxHistoryItem.SourceType.Single } - isTransfer && isSingleAddress && isNotContract + val notZero = !item.amount.isZero() + isTransfer && isSingleAddress && isNotContract && item.isOutgoing && notZero } .take(RECENT_LIST_SIZE) .mapIndexed { index, tx -> 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 1d5b01c162..61a4828722 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 @@ -453,6 +453,7 @@ internal class SendViewModel @Inject constructor( val txHistoryList = getFixedTxHistoryItemsUseCase.getSync( userWalletId = userWalletId, currency = cryptoCurrency, + pageSize = RECENT_TX_SIZE, ).getOrElse { emptyList() } uiState = stateFactory.onLoadedHistoryList(txHistory = txHistoryList) } @@ -968,6 +969,7 @@ internal class SendViewModel @Inject constructor( private companion object { const val CHECK_FEE_UPDATE_DELAY = 60_000L const val BALANCE_UPDATE_DELAY = 11_000L + const val RECENT_TX_SIZE = 100 const val RU_LOCALE = "ru" const val EN_LOCALE = "en" From e71b687b39399175ff9b3f388b7ed227ab686f11 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 5 Jun 2024 12:47:04 +0100 Subject: [PATCH 06/14] Updated on 2026-08-14 --- core/res/src/main/res/values-ru/strings.xml | 2 +- core/res/src/main/res/values/strings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/res/src/main/res/values-ru/strings.xml b/core/res/src/main/res/values-ru/strings.xml index c10f726779..fc3c720d74 100644 --- a/core/res/src/main/res/values-ru/strings.xml +++ b/core/res/src/main/res/values-ru/strings.xml @@ -645,7 +645,7 @@ Используйте %s или отсканируйте карту, чтобы разблокировать доступ к вашему кошельку Пожалуйста, выведите все средства из этого кошелька, сбросьте его к заводским настройкам и создайте новый. Доступ к текущему кошельку будет утерян. Ошибка активации - По решению разработчиков сети BNB, стандарт BEP-2 перестанет поддерживаться в июне 2024 года. Чтобы не потерять свои активы, их необходимо преобразовать в стандарт BEP-20. Используйте функцию обмена в приложении чтобы перевести их в cеть BNB Smart Chain. + По решению разработчиков сети BNB стандарт BEP-2 перестанет поддерживаться в июне 2024 года. Чтобы не потерять активы, их необходимо преобразовать в стандарт BEP-20. Используйте функцию обмена в приложении или сторонние сервисы, чтобы перевести средства в cеть BNB Smart Chain. Отключение сети BNB Beacon Chain Можно лучше Нравится diff --git a/core/res/src/main/res/values/strings.xml b/core/res/src/main/res/values/strings.xml index 6e05b58c84..6e41876896 100644 --- a/core/res/src/main/res/values/strings.xml +++ b/core/res/src/main/res/values/strings.xml @@ -645,7 +645,7 @@ Use %s or scan a card to unlock access to your wallet Please withdraw all funds from this wallet, reset it to factory settings, and create a new one. Access to the current wallet will be lost. Activation error - According to BNB network developers, support for the BEP-2 standard will end in June 2024. To avoid losing assets with this standard, please convert them to the BEP-20 standard. Use our swap service to transfer them to the BNB Smart Chain network. + According to BNB network developers, support for the BEP-2 standard will end in June 2024. To avoid losing assets with this standard, please convert them to the BEP-20 standard. Use our swap service or third-party services to transfer funds to the BNB Smart Chain network. BNB Beacon Chain will shut down Could be better Like it From aab0c74c6bbbeee71a12ea1dccf11c444b3027ae Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 5 Jun 2024 21:15:42 +0100 Subject: [PATCH 07/14] Updated on 2026-08-14 --- .../src/main/assets/configs/feature_toggles_config.json | 4 ++-- gradle/dependencies.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 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 244c40eadf..8f0373cabb 100644 --- a/core/featuretoggles/src/main/assets/configs/feature_toggles_config.json +++ b/core/featuretoggles/src/main/assets/configs/feature_toggles_config.json @@ -17,7 +17,7 @@ }, { "name": "LOCAL_USER_LOGS_ENABLED", - "version": "5.11.0" + "version": "5.12.0" }, { "name": "GENERATE_XPUB_ENABLED", @@ -25,6 +25,6 @@ }, { "name": "WC_SOLANA_TX_SIGN_ENABLED", - "version": "5.11.0" + "version": "undefined" } ] diff --git a/gradle/dependencies.toml b/gradle/dependencies.toml index a7d306c92d..0a72018550 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -86,9 +86,9 @@ markdown = "0.7.2" # endregion Other libraries # region Tangem -tangemBlockchainSdk = "release-app_5.10-639" +tangemBlockchainSdk = "release-app_5.11-657" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds -tangemCardSdk = "release-app_5.10-363" +tangemCardSdk = "release-app_5.11-365" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ # endregion Tangem From 0f6476b1cacd24699acfd7f604fc883af94322ab Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 6 Jun 2024 17:07:45 +0500 Subject: [PATCH 08/14] Updated on 2026-08-14 --- .../common/redux/legacy/LegacyMiddleware.kt | 32 +++++++++++++++++-- .../com/tangem/domain/redux/LegacyAction.kt | 19 ++++++++++- .../presentation/viewmodel/SendViewModel.kt | 22 ++++++++++++- 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/tangem/tap/common/redux/legacy/LegacyMiddleware.kt b/app/src/main/java/com/tangem/tap/common/redux/legacy/LegacyMiddleware.kt index 9ad974cdcd..5b83d8c803 100644 --- a/app/src/main/java/com/tangem/tap/common/redux/legacy/LegacyMiddleware.kt +++ b/app/src/main/java/com/tangem/tap/common/redux/legacy/LegacyMiddleware.kt @@ -1,12 +1,18 @@ package com.tangem.tap.common.redux.legacy import com.tangem.domain.redux.LegacyAction +import com.tangem.domain.tokens.utils.convertToAmount +import com.tangem.tap.common.extensions.inject import com.tangem.tap.common.feedback.RateCanBeBetterEmail import com.tangem.tap.common.feedback.SendTransactionFailedEmail import com.tangem.tap.common.redux.AppState import com.tangem.tap.common.redux.global.GlobalAction +import com.tangem.tap.proxy.redux.DaggerGraphState +import com.tangem.tap.scope import com.tangem.tap.store +import kotlinx.coroutines.launch import org.rekotlin.Middleware +import java.math.BigDecimal internal object LegacyMiddleware { val legacyMiddleware: Middleware = { _, _ -> @@ -22,9 +28,29 @@ internal object LegacyMiddleware { ) } is LegacyAction.SendEmailTransactionFailed -> { - store.state.globalState.feedbackManager?.sendEmail( - SendTransactionFailedEmail(action.errorMessage), - ) + if (store.inject(DaggerGraphState::feedbackManagerFeatureToggles).isLocalLogsEnabled) { + store.state.globalState.feedbackManager?.sendEmail( + SendTransactionFailedEmail(action.errorMessage), + ) + } else { + scope.launch { + store.inject(DaggerGraphState::walletManagersFacade) + .getOrCreateWalletManager( + userWalletId = action.userWalletId, + network = action.cryptoCurrency.network, + )?.let { walletManager -> + store.state.globalState.feedbackManager?.infoHolder?.updateOnSendError( + walletManager = walletManager, + amountToSend = action.amount.convertToAmount(action.cryptoCurrency), + feeAmount = action.fee.convertToAmount(action.cryptoCurrency), + destinationAddress = action.destinationAddress, + ) + } + store.state.globalState.feedbackManager?.sendEmail( + SendTransactionFailedEmail(action.errorMessage), + ) + } + } } } next(action) diff --git a/domain/legacy/src/main/java/com/tangem/domain/redux/LegacyAction.kt b/domain/legacy/src/main/java/com/tangem/domain/redux/LegacyAction.kt index 826ba5a966..f159059c87 100644 --- a/domain/legacy/src/main/java/com/tangem/domain/redux/LegacyAction.kt +++ b/domain/legacy/src/main/java/com/tangem/domain/redux/LegacyAction.kt @@ -1,7 +1,10 @@ package com.tangem.domain.redux import com.tangem.domain.models.scan.ScanResponse +import com.tangem.domain.tokens.model.CryptoCurrency +import com.tangem.domain.wallets.models.UserWalletId import org.rekotlin.Action +import java.math.BigDecimal sealed interface LegacyAction : Action { @@ -16,6 +19,20 @@ sealed interface LegacyAction : Action { /** * Sending an email to support when sending transaction failed + * + * @param cryptoCurrency current currency + * @param userWalletId selected user wallet id + * @param amount sending amount + * @param fee spending fee + * @param destinationAddress recipient address + * @param errorMessage sending error */ - data class SendEmailTransactionFailed(val errorMessage: String) : LegacyAction + data class SendEmailTransactionFailed( + val cryptoCurrency: CryptoCurrency, + val userWalletId: UserWalletId, + val amount: BigDecimal, + val fee: BigDecimal, + val destinationAddress: String, + val errorMessage: String, + ) : LegacyAction } \ No newline at end of file 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 61a4828722..8654c0f8f9 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 @@ -541,7 +541,27 @@ internal class SendViewModel @Inject constructor( } override fun onFailedTxEmailClick(errorMessage: String) { - reduxStateHolder.dispatch(LegacyAction.SendEmailTransactionFailed(errorMessage)) + val recipient = uiState.recipientState?.addressTextField?.value ?: return + val feeValue = uiState.feeState?.fee?.amount?.value ?: return + val amountValue = uiState.amountState?.amountTextField?.cryptoAmount?.value ?: return + + val receivingAmount = checkAndCalculateSubtractedAmount( + isAmountSubtractAvailable = isAmountSubtractAvailable, + cryptoCurrencyStatus = cryptoCurrencyStatus, + amountValue = amountValue, + feeValue = feeValue, + reduceAmountBy = uiState.sendState?.reduceAmountBy ?: BigDecimal.ZERO, + ) + reduxStateHolder.dispatch( + LegacyAction.SendEmailTransactionFailed( + cryptoCurrency = cryptoCurrency, + userWalletId = userWalletId, + amount = receivingAmount, + fee = feeValue, + destinationAddress = recipient, + errorMessage = errorMessage, + ), + ) } override fun onTokenDetailsClick(userWalletId: UserWalletId, currency: CryptoCurrency) = From 94b59fcbe35d5b401199313e8c6ba84ee3e5d3a1 Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 6 Jun 2024 17:53:12 +0500 Subject: [PATCH 09/14] Updated on 2026-08-14 --- .../common/feedback/AdditionalFeedbackInfo.kt | 10 ++++---- .../common/redux/legacy/LegacyMiddleware.kt | 5 ++-- .../com/tangem/domain/redux/LegacyAction.kt | 6 ++--- .../presentation/viewmodel/SendViewModel.kt | 24 +++++++++++-------- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/com/tangem/tap/common/feedback/AdditionalFeedbackInfo.kt b/app/src/main/java/com/tangem/tap/common/feedback/AdditionalFeedbackInfo.kt index 975fb1fb2f..21f7717f88 100644 --- a/app/src/main/java/com/tangem/tap/common/feedback/AdditionalFeedbackInfo.kt +++ b/app/src/main/java/com/tangem/tap/common/feedback/AdditionalFeedbackInfo.kt @@ -89,19 +89,19 @@ class AdditionalFeedbackInfo { fun updateOnSendError( walletManager: WalletManager, - amountToSend: Amount, + amountToSend: Amount?, feeAmount: Amount?, - destinationAddress: String, + destinationAddress: String?, ) { onSendErrorWalletInfo = createEmailWalletInfo(walletManager) - this.destinationAddress = destinationAddress - amount = amountToSend.value?.stripZeroPlainString() ?: "0" + this.destinationAddress = destinationAddress ?: "0" + amount = amountToSend?.value?.stripZeroPlainString() ?: "0" fee = if (feeAmount != null) { feeAmount.value?.stripZeroPlainString() ?: "0" } else { "Unable to receive" } - token = if (amountToSend.type is AmountType.Token) amountToSend.currencySymbol else "" + token = if (amountToSend?.type is AmountType.Token) amountToSend.currencySymbol else "" } private fun createEmailWalletInfo(walletManager: WalletManager): EmailWalletInfo { diff --git a/app/src/main/java/com/tangem/tap/common/redux/legacy/LegacyMiddleware.kt b/app/src/main/java/com/tangem/tap/common/redux/legacy/LegacyMiddleware.kt index 5b83d8c803..7cf0e08bf1 100644 --- a/app/src/main/java/com/tangem/tap/common/redux/legacy/LegacyMiddleware.kt +++ b/app/src/main/java/com/tangem/tap/common/redux/legacy/LegacyMiddleware.kt @@ -12,7 +12,6 @@ import com.tangem.tap.scope import com.tangem.tap.store import kotlinx.coroutines.launch import org.rekotlin.Middleware -import java.math.BigDecimal internal object LegacyMiddleware { val legacyMiddleware: Middleware = { _, _ -> @@ -41,8 +40,8 @@ internal object LegacyMiddleware { )?.let { walletManager -> store.state.globalState.feedbackManager?.infoHolder?.updateOnSendError( walletManager = walletManager, - amountToSend = action.amount.convertToAmount(action.cryptoCurrency), - feeAmount = action.fee.convertToAmount(action.cryptoCurrency), + amountToSend = action.amount?.convertToAmount(action.cryptoCurrency), + feeAmount = action.fee?.convertToAmount(action.cryptoCurrency), destinationAddress = action.destinationAddress, ) } diff --git a/domain/legacy/src/main/java/com/tangem/domain/redux/LegacyAction.kt b/domain/legacy/src/main/java/com/tangem/domain/redux/LegacyAction.kt index f159059c87..3e0b022afd 100644 --- a/domain/legacy/src/main/java/com/tangem/domain/redux/LegacyAction.kt +++ b/domain/legacy/src/main/java/com/tangem/domain/redux/LegacyAction.kt @@ -30,9 +30,9 @@ sealed interface LegacyAction : Action { data class SendEmailTransactionFailed( val cryptoCurrency: CryptoCurrency, val userWalletId: UserWalletId, - val amount: BigDecimal, - val fee: BigDecimal, - val destinationAddress: String, + val amount: BigDecimal?, + val fee: BigDecimal?, + val destinationAddress: String?, val errorMessage: String, ) : LegacyAction } \ No newline at end of file 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 8654c0f8f9..40add3e136 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 @@ -541,17 +541,21 @@ internal class SendViewModel @Inject constructor( } override fun onFailedTxEmailClick(errorMessage: String) { - val recipient = uiState.recipientState?.addressTextField?.value ?: return - val feeValue = uiState.feeState?.fee?.amount?.value ?: return - val amountValue = uiState.amountState?.amountTextField?.cryptoAmount?.value ?: return + val recipient = uiState.recipientState?.addressTextField?.value + val feeValue = uiState.feeState?.fee?.amount?.value + val amountValue = uiState.amountState?.amountTextField?.cryptoAmount?.value - val receivingAmount = checkAndCalculateSubtractedAmount( - isAmountSubtractAvailable = isAmountSubtractAvailable, - cryptoCurrencyStatus = cryptoCurrencyStatus, - amountValue = amountValue, - feeValue = feeValue, - reduceAmountBy = uiState.sendState?.reduceAmountBy ?: BigDecimal.ZERO, - ) + val receivingAmount = if (amountValue != null && feeValue != null) { + checkAndCalculateSubtractedAmount( + isAmountSubtractAvailable = isAmountSubtractAvailable, + cryptoCurrencyStatus = cryptoCurrencyStatus, + amountValue = amountValue, + feeValue = feeValue, + reduceAmountBy = uiState.sendState?.reduceAmountBy ?: BigDecimal.ZERO, + ) + } else { + null + } reduxStateHolder.dispatch( LegacyAction.SendEmailTransactionFailed( cryptoCurrency = cryptoCurrency, From 0c6aa6f862d6d331905fefd20b2c214c1a53decc Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 6 Jun 2024 19:11:52 +0100 Subject: [PATCH 10/14] Updated on 2026-08-14 --- .../com/tangem/feature/swap/models/states/FeeItemState.kt | 4 ++++ .../main/java/com/tangem/feature/swap/ui/StateBuilder.kt | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/features/swap/presentation/src/main/java/com/tangem/feature/swap/models/states/FeeItemState.kt b/features/swap/presentation/src/main/java/com/tangem/feature/swap/models/states/FeeItemState.kt index e01a8b8058..8c3218aa96 100644 --- a/features/swap/presentation/src/main/java/com/tangem/feature/swap/models/states/FeeItemState.kt +++ b/features/swap/presentation/src/main/java/com/tangem/feature/swap/models/states/FeeItemState.kt @@ -5,6 +5,10 @@ import com.tangem.feature.swap.domain.models.ui.FeeType sealed class FeeItemState { + /** + * @param amountCrypto - crypto amount formatted with symbol + * @param amountFiatFormatted - formatted fiat amount + */ data class Content( val feeType: FeeType, val title: TextReference, diff --git a/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt b/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt index e65136aa1a..bfb07ed4a0 100644 --- a/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt +++ b/features/swap/presentation/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt @@ -472,9 +472,7 @@ internal class StateBuilder( warnings.add( SwapWarning.GeneralWarning( createNetworkFeeCoverageNotificationConfig( - quoteModel.fromTokenInfo.tokenAmount.getFormattedCryptoAmount( - quoteModel.fromTokenInfo.cryptoCurrencyStatus.currency, - ), + fee.feeCryptoFormatted, fee.feeFiatFormatted, ), ), @@ -572,7 +570,7 @@ internal class StateBuilder( warnings.add(getWarningForError(dataError, fromToken.cryptoCurrencyStatus.currency)) if (includeFeeInAmount is IncludeFeeInAmount.Included && uiStateHolder.fee is FeeItemState.Content) { val feeCoverageNotification = createNetworkFeeCoverageNotificationConfig( - fromToken.tokenAmount.getFormattedCryptoAmount(fromToken.cryptoCurrencyStatus.currency), + uiStateHolder.fee.amountCrypto, uiStateHolder.fee.amountFiatFormatted, ) warnings.add(SwapWarning.GeneralWarning(feeCoverageNotification)) From 856a1409bb3bc1b26b7ce18d712451745845bccb Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 7 Jun 2024 12:00:03 +0100 Subject: [PATCH 11/14] Updated on 2026-08-14 --- domain/demo/src/main/java/com/tangem/domain/demo/DemoConfig.kt | 1 - gradle/dependencies.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/domain/demo/src/main/java/com/tangem/domain/demo/DemoConfig.kt b/domain/demo/src/main/java/com/tangem/domain/demo/DemoConfig.kt index 32faeb03aa..a7b9ab2d90 100644 --- a/domain/demo/src/main/java/com/tangem/domain/demo/DemoConfig.kt +++ b/domain/demo/src/main/java/com/tangem/domain/demo/DemoConfig.kt @@ -1,6 +1,5 @@ package com.tangem.domain.demo -import com.tangem.blockchain.BuildConfig import com.tangem.blockchain.common.Amount import com.tangem.blockchain.common.Blockchain import java.math.BigDecimal diff --git a/gradle/dependencies.toml b/gradle/dependencies.toml index 0a72018550..17cdd58c30 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -86,7 +86,7 @@ markdown = "0.7.2" # endregion Other libraries # region Tangem -tangemBlockchainSdk = "release-app_5.11-657" +tangemBlockchainSdk = "release-app_5.11-661" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "release-app_5.11-365" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ From d108dbed137d9a1c2af0c59a889ef361b7d6145b Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 10 Jun 2024 11:50:50 +0100 Subject: [PATCH 12/14] 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 17cdd58c30..17481e201d 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -86,7 +86,7 @@ markdown = "0.7.2" # endregion Other libraries # region Tangem -tangemBlockchainSdk = "release-app_5.11-661" +tangemBlockchainSdk = "release-app_5.11-665" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "release-app_5.11-365" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ From bf5e1fa8379858fa2b2915cf744015ae5a08e06c Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 10 Jun 2024 21:04:35 +0800 Subject: [PATCH 13/14] 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 17481e201d..ba65bfa15c 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -86,7 +86,7 @@ markdown = "0.7.2" # endregion Other libraries # region Tangem -tangemBlockchainSdk = "release-app_5.11-665" +tangemBlockchainSdk = "release-app_5.11-666" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "release-app_5.11-365" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ From cf6316d21f0d05fd48d50b7d7d258aea9262bb51 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 10 Jun 2024 20:46:25 +0100 Subject: [PATCH 14/14] Updated on 2026-08-14 --- app/src/main/assets/tangem-app-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/assets/tangem-app-config b/app/src/main/assets/tangem-app-config index 4424b32de5..a837db2797 160000 --- a/app/src/main/assets/tangem-app-config +++ b/app/src/main/assets/tangem-app-config @@ -1 +1 @@ -Subproject commit 4424b32de5a80305cd3ca6eca219b09a16e940c5 +Subproject commit a837db27973dca80e51cf9590eb34e060bed1236