Updated on 2026-08-14
This commit is contained in:
parent
7e79305db7
commit
55942f2208
13 changed files with 281 additions and 71 deletions
|
|
@ -435,8 +435,6 @@ internal class SendNotificationFactory(
|
|||
addCardanoTransactionValidationError(
|
||||
error = it as? BlockchainSdkError.Cardano ?: return@fold,
|
||||
sendingCurrency = sendingCurrency,
|
||||
sendingAmount = sendingAmount,
|
||||
fee = fee,
|
||||
)
|
||||
},
|
||||
ifRight = {
|
||||
|
|
@ -455,8 +453,6 @@ internal class SendNotificationFactory(
|
|||
private suspend fun MutableList<SendNotification>.addCardanoTransactionValidationError(
|
||||
error: BlockchainSdkError.Cardano,
|
||||
sendingCurrency: CryptoCurrency,
|
||||
sendingAmount: BigDecimal,
|
||||
fee: Fee,
|
||||
) {
|
||||
when (error) {
|
||||
BlockchainSdkError.Cardano.InsufficientMinAdaBalanceToSendToken -> {
|
||||
|
|
@ -473,9 +469,15 @@ internal class SendNotificationFactory(
|
|||
BlockchainSdkError.Cardano.InsufficientRemainingBalance,
|
||||
BlockchainSdkError.Cardano.InsufficientSendingAdaAmount,
|
||||
-> {
|
||||
addDustWarningNotification(
|
||||
feeValue = fee.amount.value ?: BigDecimal.ZERO,
|
||||
sendingAmount = sendingAmount,
|
||||
val dustValue = currencyChecksRepository.getDustValue(
|
||||
userWalletId = userWalletProvider().walletId,
|
||||
network = sendingCurrency.network,
|
||||
) ?: return
|
||||
|
||||
add(
|
||||
SendNotification.Error.MinimumAmountError(
|
||||
amount = dustValue.parseBigDecimal(sendingCurrency.decimals),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue