Skip to content

Commit

Permalink
fix: Early exit when searching for unexecutable V2 slow fills (#1200)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai authored Feb 19, 2024
1 parent 28ec03a commit ff7c964
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/FillUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ export async function getFillDataForSlowFillFromPreviousRootBundle(

// Find the first fill chronologically for matched deposit for the input fill.
const allMatchingFills = sortEventsAscending(
allValidFills.filter((_fill) => sdkUtils.filledSameDeposit(_fill, fill) && versionFilter(fill, _fill))
allValidFills.filter(
(_fill) =>
_fill.depositId === fill.depositId && sdkUtils.filledSameDeposit(_fill, fill) && versionFilter(fill, _fill)
)
);
let firstFillForSameDeposit = allMatchingFills.find((_fill) => isFirstFillForDeposit(_fill));

Expand Down

0 comments on commit ff7c964

Please sign in to comment.