Skip to content

Commit

Permalink
fix: break loop if remaining qty is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcre committed Aug 16, 2023
1 parent 5c4997b commit 6fb60b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/exchange/types/matching.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ func (ctx *MatchingContext) ExecuteOrder(
remainingQty = sdk.MinDec(remainingQty, qty)
}
}
if !remainingQty.IsNil() && !remainingQty.IsPositive() {
break
}

executedQty := executableQty
if !remainingQty.IsNil() {
Expand Down

0 comments on commit 6fb60b5

Please sign in to comment.