Skip to content

Commit

Permalink
Merge pull request #78 from gnoswap-labs/GSW-439-fix-dryswap-uses-opp…
Browse files Browse the repository at this point in the history
…osite-value-to-check

GSW-439 fix: Dryswap() uses opposite value to check
  • Loading branch information
r3v4s authored Oct 17, 2023
2 parents 5168cdb + 9be59e3 commit e4f549d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pool/math_logic.gno
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ func DrySwap(
}

if zeroForOne {
require(pool.balances.token0 > amount0, ufmt.Sprintf("[POOL] math_logic.gno__DrySwap() || pool.balances.token0(%s) > amount0(%s)", pool.balances.token0, amount0))
require(pool.balances.token1 > amount1, ufmt.Sprintf("[POOL] math_logic.gno__DrySwap()_ZFO_T || pool.balances.token1(%s) > amount1(%s)", pool.balances.token1, amount1))
} else {
require(pool.balances.token1 > amount1, ufmt.Sprintf("[POOL] math_logic.gno__DrySwap() || pool.balances.token1(%s) > amount1(%s)", pool.balances.token1, amount1))
require(pool.balances.token0 > amount0, ufmt.Sprintf("[POOL] math_logic.gno__DrySwap()_ZFO_F || pool.balances.token0(%s) > amount0(%s)", pool.balances.token0, amount0))
}

return amount0, amount1
Expand Down

0 comments on commit e4f549d

Please sign in to comment.