Updated on 2026-08-14

This commit is contained in:
Tangem 2024-10-25 13:27:52 +03:00
parent e60945c013
commit 2eed92d8e9
3 changed files with 15 additions and 2 deletions

View file

@ -45,7 +45,7 @@ import kotlinx.coroutines.flow.map
import java.math.BigDecimal
@Suppress("LongParameterList", "LargeClass")
internal class SendNotificationFactory constructor(
internal class SendNotificationFactory(
private val analyticsEventHandler: AnalyticsEventHandler,
private val validateTransactionUseCase: ValidateTransactionUseCase,
private val getCurrencyCheckUseCase: GetCurrencyCheckUseCase,
@ -90,11 +90,14 @@ internal class SendNotificationFactory constructor(
reduceAmountBy = reduceAmountBy,
)
val feeError = (feeState.feeSelectorState as? FeeSelectorState.Error)?.error
val recipientAddress = state.recipientState?.addressTextField?.value
val currencyCheck = getCurrencyCheckUseCase(
userWalletId = userWalletId,
currencyStatus = cryptoCurrencyStatus,
amount = sendingAmount,
fee = feeValue,
recipientAddress = recipientAddress,
)
buildList {
addErrorNotifications(
@ -187,7 +190,7 @@ internal class SendNotificationFactory constructor(
reserveAmount = currencyCheck.reserveAmount,
sendingAmount = sendingAmount,
cryptoCurrency = currency,
isAccountFunded = false,
isAccountFunded = currencyCheck.isAccountFunded,
)
}