Updated on 2026-08-14

This commit is contained in:
Tangem 2024-09-30 17:19:39 +05:00
parent a107ddd36e
commit a00ea0a438
14 changed files with 696 additions and 843 deletions

View file

@ -1,7 +1,6 @@
package com.tangem.common.ui.notifications
import com.tangem.blockchain.common.BlockchainSdkError
import com.tangem.blockchain.common.transaction.Fee
import com.tangem.common.ui.R
import com.tangem.common.ui.amountScreen.models.AmountFieldModel
import com.tangem.common.ui.amountScreen.utils.getFiatString
@ -248,9 +247,9 @@ object NotificationsFactory {
fun MutableList<NotificationUM>.addValidateTransactionNotifications(
dustValue: BigDecimal,
fee: Fee?,
validationError: Throwable?,
cryptoCurrency: CryptoCurrency,
minAdaValue: BigDecimal?, // TODO revert to Fee, after swap TxFee refactored
onReduceClick: (
reduceAmountTo: BigDecimal,
notification: Class<out NotificationUM>,
@ -266,11 +265,11 @@ object NotificationsFactory {
error = validationError,
onReduceClick = onReduceClick,
)
null -> (fee as? Fee.CardanoToken)?.let {
null -> minAdaValue?.let {
add(
NotificationUM.Cardano.MinAdaValueCharged(
tokenName = cryptoCurrency.name,
minAdaValue = it.minAdaValue.parseBigDecimal(cryptoCurrency.decimals),
minAdaValue = minAdaValue.parseBigDecimal(cryptoCurrency.decimals),
),
)
}