Updated on 2026-08-14

This commit is contained in:
Tangem 2025-02-24 17:59:29 +05:00
commit abfa597c4c
2 changed files with 7 additions and 7 deletions

View file

@ -218,12 +218,12 @@ internal class SwapNotificationsFactory(
if (status is CryptoCurrencyStatus.NoAccount) {
val amount = quoteModel.toTokenInfo.tokenAmount.value
val amountToCreateAccount = status.amountToCreateAccount
val currencyTo = quoteModel.fromTokenInfo.cryptoCurrencyStatus.currency
val currencyTo = quoteModel.toTokenInfo.cryptoCurrencyStatus.currency
if (amount < amountToCreateAccount) {
add(
SwapNotificationUM.Warning.NeedReserveToCreateAccount(
status.amountToCreateAccount.parseBigDecimal(currencyTo.decimals),
currencyTo.symbol,
receiveAmount = status.amountToCreateAccount.parseBigDecimal(currencyTo.decimals),
receiveToken = currencyTo.symbol,
),
)
}

View file

@ -127,12 +127,12 @@ internal object SwapNotificationUM {
)
data class NeedReserveToCreateAccount(
val amount: String,
val token: String,
val receiveAmount: String,
val receiveToken: String,
) : Warning(
title = resourceReference(
id = R.string.send_notification_invalid_reserve_amount_title,
formatArgs = wrappedList("$amount $token"),
id = R.string.warning_express_notification_invalid_reserve_amount_title,
formatArgs = wrappedList("$receiveAmount $receiveToken"),
),
subtitle = resourceReference(R.string.send_notification_invalid_reserve_amount_text),
)