Updated on 2026-08-14

This commit is contained in:
Tangem 2024-12-25 16:01:44 +03:00
parent 5d892618a8
commit ada21e5a37
2 changed files with 57 additions and 4 deletions

View file

@ -103,6 +103,7 @@ internal class SwapNotificationsFactory(
providerName: String,
): ImmutableList<NotificationUM> {
val warnings = buildList {
maybeAddRentExemptionError(quoteModel)
maybeAddDomainWarnings(quoteModel, feeCryptoCurrencyStatus, selectedFeeType)
maybeAddNeedReserveToCreateAccountWarning(quoteModel)
maybeAddPermissionNeededWarning(quoteModel, fromToken, providerName)
@ -113,6 +114,12 @@ internal class SwapNotificationsFactory(
return warnings.toPersistentList()
}
private fun MutableList<NotificationUM>.maybeAddRentExemptionError(quoteModel: SwapState.QuotesLoadedState) {
quoteModel.currencyCheck?.rentWarning?.let {
add(NotificationUM.Solana.RentInfo(it))
}
}
private fun MutableList<NotificationUM>.maybeAddTransactionInProgressWarning(
quoteModel: SwapState.QuotesLoadedState,
) {