// ICondition — returns true when escrow period has passed
function check(
AuthCaptureEscrow.PaymentInfo calldata paymentInfo,
uint256,
address
) external view returns (bool allowed) {
return !isDuringEscrowPeriod(paymentInfo);
}
// View function to check if still in escrow period
function isDuringEscrowPeriod(
AuthCaptureEscrow.PaymentInfo calldata paymentInfo
) public view returns (bool) {
bytes32 hash = escrow.getHash(paymentInfo);
uint256 authTime = authorizationTimes[hash];
if (authTime == 0) return false;
return block.timestamp < authTime + ESCROW_PERIOD;
}