From 3fc10d21df7de3581aa1b3540a76b1241b9676dc Mon Sep 17 00:00:00 2001 From: byshape Date: Tue, 27 Aug 2024 13:18:11 +0100 Subject: [PATCH 1/2] Update comment --- contracts/BaseEscrowFactory.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/BaseEscrowFactory.sol b/contracts/BaseEscrowFactory.sol index aed6835..7c71256 100644 --- a/contracts/BaseEscrowFactory.sol +++ b/contracts/BaseEscrowFactory.sol @@ -175,7 +175,7 @@ abstract contract BaseEscrowFactory is IEscrowFactory, ResolverValidationExtensi uint256 calculatedIndex = (orderMakingAmount - remainingMakingAmount + makingAmount - 1) * partsAmount / orderMakingAmount; if (remainingMakingAmount == makingAmount) { - // The last secret must be used for the last fill. + // 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. return (calculatedIndex + 2 == validatedIndex); } else if (orderMakingAmount != remainingMakingAmount) { // Calculate the previous fill index only if this is not the first fill. From fbb5171634785a1601460f5a21318d6633b7b035 Mon Sep 17 00:00:00 2001 From: byshape Date: Tue, 27 Aug 2024 13:51:13 +0100 Subject: [PATCH 2/2] Change last fill -> filled to completion --- contracts/BaseEscrowFactory.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/BaseEscrowFactory.sol b/contracts/BaseEscrowFactory.sol index 7c71256..d866f1d 100644 --- a/contracts/BaseEscrowFactory.sol +++ b/contracts/BaseEscrowFactory.sol @@ -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.