From 04905aca19a399e58589b8e1c6f1c8ff647945ae Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 23 Oct 2025 19:42:30 +0500 Subject: [PATCH] Updated on 2026-08-14 --- .../com/tangem/common/ui/notifications/NotificationUM.kt | 8 +++++++- .../common/ui/notifications/NotificationsFactory.kt | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common/ui/src/main/java/com/tangem/common/ui/notifications/NotificationUM.kt b/common/ui/src/main/java/com/tangem/common/ui/notifications/NotificationUM.kt index 66b28de458..662a404f90 100644 --- a/common/ui/src/main/java/com/tangem/common/ui/notifications/NotificationUM.kt +++ b/common/ui/src/main/java/com/tangem/common/ui/notifications/NotificationUM.kt @@ -9,6 +9,7 @@ import com.tangem.core.ui.extensions.wrappedList import com.tangem.core.ui.format.bigdecimal.crypto import com.tangem.core.ui.format.bigdecimal.format import com.tangem.core.ui.format.bigdecimal.shorted +import com.tangem.domain.models.currency.CryptoCurrency import com.tangem.domain.tokens.model.warnings.CryptoCurrencyWarning import java.math.BigDecimal @@ -399,11 +400,16 @@ sealed class NotificationUM(val config: NotificationConfig) { data class RentExemptionDestination( private val rentExemptionAmount: BigDecimal, + private val cryptoCurrency: CryptoCurrency, ) : Error( title = TextReference.Res(R.string.send_notification_invalid_amount_title), subtitle = TextReference.Res( id = R.string.send_notification_invalid_amount_rent_destination, - formatArgs = wrappedList(rentExemptionAmount), + formatArgs = wrappedList( + rentExemptionAmount.format { + crypto(cryptoCurrency) + }, + ), ), ) } diff --git a/common/ui/src/main/java/com/tangem/common/ui/notifications/NotificationsFactory.kt b/common/ui/src/main/java/com/tangem/common/ui/notifications/NotificationsFactory.kt index 4afee30930..362f8ad5a4 100644 --- a/common/ui/src/main/java/com/tangem/common/ui/notifications/NotificationsFactory.kt +++ b/common/ui/src/main/java/com/tangem/common/ui/notifications/NotificationsFactory.kt @@ -368,6 +368,7 @@ object NotificationsFactory { is BlockchainSdkError.DestinationTagRequired -> addRequireDestinationTagErrorNotification() is BlockchainSdkError.Solana.DestinationRentExemption -> addRentExemptionDestinationNotification( rentExemptionAmount = validationError.rentAmount, + cryptoCurrency = cryptoCurrency, ) is BlockchainSdkError.TransactionDustChangeError -> add( NotificationUM.Error.MinimumAmountError( @@ -462,10 +463,14 @@ object NotificationsFactory { add(NotificationUM.Solana.RentInfo(rentWarning)) } - fun MutableList.addRentExemptionDestinationNotification(rentExemptionAmount: BigDecimal) { + private fun MutableList.addRentExemptionDestinationNotification( + rentExemptionAmount: BigDecimal, + cryptoCurrency: CryptoCurrency, + ) { add( NotificationUM.Solana.RentExemptionDestination( rentExemptionAmount = rentExemptionAmount, + cryptoCurrency = cryptoCurrency, ), ) }