Updated on 2026-08-14
This commit is contained in:
parent
390513dc53
commit
54cc9e6245
2 changed files with 4 additions and 3 deletions
|
|
@ -71,7 +71,7 @@ internal class SendNotificationFactory(
|
|||
buildList {
|
||||
// errors
|
||||
addFeeUnreachableNotification(feeState.feeSelectorState)
|
||||
addExceedBalanceNotification(feeValue, sendingAmount)
|
||||
addExceedBalanceNotification(feeValue, sendingAmount, isFeeCoverage)
|
||||
addExceedsBalanceNotification(feeState.fee)
|
||||
addDustWarningNotification(feeValue, sendingAmount)
|
||||
addTransactionLimitErrorNotification(feeValue, sendingAmount)
|
||||
|
|
@ -107,11 +107,12 @@ internal class SendNotificationFactory(
|
|||
private fun MutableList<SendNotification>.addExceedBalanceNotification(
|
||||
feeAmount: BigDecimal,
|
||||
receivedAmount: BigDecimal,
|
||||
isFeeCoverage: Boolean,
|
||||
) {
|
||||
val cryptoCurrencyStatus = cryptoCurrencyStatusProvider()
|
||||
val balance = cryptoCurrencyStatus.value.amount ?: BigDecimal.ZERO
|
||||
|
||||
if (!isSubtractAvailableProvider()) return
|
||||
if (isFeeCoverage) return
|
||||
|
||||
val showNotification = receivedAmount + feeAmount > balance
|
||||
if (showNotification) {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ internal fun checkFeeCoverage(
|
|||
feeValue: BigDecimal,
|
||||
): Boolean {
|
||||
if (!isSubtractAvailable) return false
|
||||
return balance < amountValue + feeValue && balance > feeValue
|
||||
return balance < amountValue + feeValue && balance > feeValue && balance >= amountValue
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue