mirror of
https://github.com/status-im/status-go.git
synced 2025-02-21 19:28:29 +00:00
Fix: allow zero tx
If bonder fees are 0 there is no need to check if bonder fees are bigger or equal to amount to prevent impossible transaction
This commit is contained in:
parent
11a3612290
commit
a0bd3c9a94
@ -627,13 +627,15 @@ func (r *Router) suggestedRoutes(
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
if maxAmountIn.ToInt().Cmp(amountIn) >= 0 {
|
||||
if bonderFees.Cmp(amountIn) >= 0 {
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
if bonderFees.Cmp(maxAmountIn.ToInt()) >= 0 {
|
||||
continue
|
||||
if bonderFees.Cmp(zero) != 0 {
|
||||
if maxAmountIn.ToInt().Cmp(amountIn) >= 0 {
|
||||
if bonderFees.Cmp(amountIn) >= 0 {
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
if bonderFees.Cmp(maxAmountIn.ToInt()) >= 0 {
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
gasLimit := uint64(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user