-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(orderbook): remainingOrder on retries
This fixes a bug where orders that fail a swap and retry matching with different orders could fail to enter the order book for any remaining, unmatched portion of the order, even when the order is a limit order. The `discardRemaining` option was always being set to true on order matching retries. This was done to prevent fragments of an order reentering the book as separate orders, but it would unintentionally discard orders altogether if the retry matching routine doesn't hit the timeout limit. Instead, a separate `retry` option to the `placeOrder` call ensures that parts of a retried order don't enter the order book alone, while also ensuring that any unmatched quantity of an order enters the order book when it's intended to do so.
- Loading branch information
Showing
1 changed file
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters