Updated on 2026-08-14
This commit is contained in:
parent
0b00f8f277
commit
b7395cb1a2
2 changed files with 6 additions and 4 deletions
|
|
@ -395,7 +395,7 @@ class DefaultWalletManagersFacade(
|
|||
derivationPath = network.derivationPath.value,
|
||||
)
|
||||
|
||||
return if (manager is ExistentialDepositProvider) manager.dustValue else null
|
||||
return manager?.dustValue
|
||||
}
|
||||
|
||||
@Deprecated("Will be removed in future")
|
||||
|
|
|
|||
|
|
@ -368,9 +368,11 @@ internal class SwapInteractorImpl @Inject constructor(
|
|||
}
|
||||
val dust = repository.getDustValue(userWalletId, fromToken.network)
|
||||
val balance = fromTokenStatus.value.amount ?: BigDecimal.ZERO
|
||||
val isLowerThenDust = amount.value < dust || balance - amount.value < dust
|
||||
if (dust != null && !balance.isNullOrZero() && isLowerThenDust) {
|
||||
warnings.add(Warning.MinAmountWarning(dust))
|
||||
if (dust != null && !balance.isNullOrZero()) {
|
||||
val isLowerThenDust = amount.value < dust || balance - amount.value < dust
|
||||
if (isLowerThenDust) {
|
||||
warnings.add(Warning.MinAmountWarning(dust))
|
||||
}
|
||||
}
|
||||
return warnings
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue