Updated on 2026-08-14

This commit is contained in:
Tangem 2026-06-30 13:01:52 +03:00
parent ff958f6bba
commit 675dc70a1c
4 changed files with 227 additions and 2 deletions

View file

@ -138,7 +138,10 @@ internal class SwapNotificationsFactory(
maybeAddPriceImpactNotification(quoteModel.priceImpact)
maybeAddHighNetworkFeeWarning(isHighNetworkFee)
}
return warnings.toPersistentList()
// Two independent dust checks (SDK TransactionDustChangeError in addValidateTransactionNotifications +
// manual change-below-dust in addDustWarningNotification) can both add an identical MinimumAmountError.
// distinct() collapses the duplicate "Invalid amount" banner.
return warnings.distinct().toPersistentList()
}
private fun MutableList<NotificationUM>.maybeAddHighNetworkFeeWarning(isHighNetworkFee: Boolean) {

View file

@ -69,7 +69,10 @@ internal class SwapTransferNotificationsFactory @Inject constructor() {
feeError = getFeeError,
actions = actions,
)
}.toPersistentList()
}
// Two independent dust checks can both add an identical MinimumAmountError; collapse the duplicate banner.
.distinct()
.toPersistentList()
}
private fun MutableList<NotificationUM>.maybeAddRentExemptionError(state: SwapState.Transfer) {