From d0d9fcfef8955fe1bdec58a390e4255edea4b75e Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 18 Nov 2024 20:40:39 +0500 Subject: [PATCH] Updated on 2026-08-14 --- .../feature/swap/presentation/SwapNotificationsFactory.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/features/swap/presentation/src/main/java/com/tangem/feature/swap/presentation/SwapNotificationsFactory.kt b/features/swap/presentation/src/main/java/com/tangem/feature/swap/presentation/SwapNotificationsFactory.kt index dfcb39b3d8..38fc6507ad 100644 --- a/features/swap/presentation/src/main/java/com/tangem/feature/swap/presentation/SwapNotificationsFactory.kt +++ b/features/swap/presentation/src/main/java/com/tangem/feature/swap/presentation/SwapNotificationsFactory.kt @@ -190,8 +190,7 @@ internal class SwapNotificationsFactory( ) addReduceAmountNotification( cryptoCurrencyStatus = fromCurrencyStatus, - fromAmount = amountToRequest, - feeValue = fee?.feeValue.orZero(), + fromAmount = quoteModel.fromTokenInfo.tokenAmount, onReduceAmount = actions.onReduceAmount, ) addTransactionLimitErrorNotification( @@ -295,13 +294,12 @@ internal class SwapNotificationsFactory( private fun MutableList.addReduceAmountNotification( cryptoCurrencyStatus: CryptoCurrencyStatus, fromAmount: SwapAmount, - feeValue: BigDecimal, onReduceAmount: (SwapAmount) -> Unit, ) { val isTezos = isTezos(cryptoCurrencyStatus.currency.network.id.value) val balance = cryptoCurrencyStatus.value.amount ?: BigDecimal.ZERO val threshold = getTezosThreshold() - val isTotalBalance = fromAmount.value + feeValue >= balance && balance > threshold + val isTotalBalance = fromAmount.value >= balance && balance > threshold if (isTezos && isTotalBalance) { add( SwapNotificationUM.Warning.ReduceAmount(