Skip to content

Commit

Permalink
fix: apply code review suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: crypin <101186983+crypin@users.noreply.github.com>
  • Loading branch information
kingcre and crypin authored Sep 12, 2023
1 parent 18f96df commit eeea283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/amm/keeper/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func (k OrderSource) ConstructMemOrderBookSide(
accQuote := utils.ZeroDec
numPriceLevels := 0
k.IteratePoolOrders(ctx, pool, opts.IsBuy, func(price, qty, openQty sdk.Dec) (stop bool) {
if opts.IsBuy && price.LT(minPrice) ||
!opts.IsBuy && price.GT(maxPrice) {
if (opts.IsBuy && price.LT(minPrice)) ||
(!opts.IsBuy && price.GT(maxPrice)) {
return true
}
if opts.ReachedLimit(price, accQty, accQuote, numPriceLevels) {
Expand Down

0 comments on commit eeea283

Please sign in to comment.