Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions contract/r/gnoswap/pool/v1/swap.gno
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,17 @@ func (i *poolV1) Swap(
// receive token0 from swap callback
// send token1 to recipient (output)
if result.Amount1.IsNeg() {
i.safeSwapCallback(pool, token0Path, result.Amount0.Abs(), zeroForOne, swapCallback)

i.safeTransfer(pool, recipient, token1Path, result.Amount1.Abs(), false)

i.safeSwapCallback(pool, token0Path, result.Amount0.Abs(), zeroForOne, swapCallback)
}
} else {
// receive token1 from swap callback
// send token0 to recipient (output)
if result.Amount0.IsNeg() {
i.safeSwapCallback(pool, token1Path, result.Amount1.Abs(), zeroForOne, swapCallback)

i.safeTransfer(pool, recipient, token0Path, result.Amount0.Abs(), true)

i.safeSwapCallback(pool, token1Path, result.Amount1.Abs(), zeroForOne, swapCallback)
}
}

Expand Down
Loading