Skip to content

Commit

Permalink
Change last fill -> filled to completion
Browse files Browse the repository at this point in the history
  • Loading branch information
byshape committed Aug 27, 2024
1 parent 3fc10d2 commit fbb5171
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/BaseEscrowFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ abstract contract BaseEscrowFactory is IEscrowFactory, ResolverValidationExtensi
uint256 calculatedIndex = (orderMakingAmount - remainingMakingAmount + makingAmount - 1) * partsAmount / orderMakingAmount;

if (remainingMakingAmount == makingAmount) {
// A secret with index i + 1 must be used for the last order fill where i is the index of the secret for the last part.
// If the order is filled to completion, a secret with index i + 1 must be used
// where i is the index of the secret for the last part.
return (calculatedIndex + 2 == validatedIndex);
} else if (orderMakingAmount != remainingMakingAmount) {
// Calculate the previous fill index only if this is not the first fill.
Expand Down

0 comments on commit fbb5171

Please sign in to comment.