Skip to content

Commit 22bab3f

Browse files
committed
feat(auction_escrow): allow auction lot reclaim after cleanup time
1 parent 36be989 commit 22bab3f

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

src/HydraAuctionOnchain/Types/AuctionTerms.hs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module HydraAuctionOnchain.Types.AuctionTerms
44
( PAuctionTerms (PAuctionTerms)
55
, pbiddingPeriod
66
, pcleanupPeriod
7-
, ppenaltyPeriod
87
, ppostBiddingPeriod
98
, ppostPurchasePeriod
109
, ppurchasePeriod
@@ -152,14 +151,6 @@ ppurchasePeriod = phoistAcyclic $
152151
# auctionTermsFields.biddingEnd
153152
# auctionTermsFields.purchaseDeadline
154153

155-
ppenaltyPeriod :: Term s (PAuctionTerms :--> PPOSIXTimeRange)
156-
ppenaltyPeriod = phoistAcyclic $
157-
plam $ \auctionTerms -> P.do
158-
auctionTermsFields <- pletFields @["purchaseDeadline", "cleanup"] auctionTerms
159-
pintervalFiniteClosedOpen
160-
# auctionTermsFields.purchaseDeadline
161-
# auctionTermsFields.cleanup
162-
163154
pcleanupPeriod :: Term s (PAuctionTerms :--> PPOSIXTimeRange)
164155
pcleanupPeriod = phoistAcyclic $
165156
plam $ \auctionTerms ->

src/HydraAuctionOnchain/Validators/AuctionEscrow.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import HydraAuctionOnchain.Types.AuctionTerms
3333
( PAuctionTerms
3434
, pbiddingPeriod
3535
, pcleanupPeriod
36-
, ppenaltyPeriod
36+
, ppostPurchasePeriod
3737
, ppurchasePeriod
3838
, ptotalAuctionFees
3939
)
@@ -416,10 +416,9 @@ pcheckSellerReclaims = phoistAcyclic $
416416
passert $(errCode AuctionEscrow'SellerReclaims'Error'UnexpectedTokensMintedBurned) $
417417
pfromData txInfoFields.mint #== mempty
418418

419-
-- This redeemer can only be used during
420-
-- the penalty period.
419+
-- This redeemer can only be used after the purchase deadline.
421420
passert $(errCode AuctionEscrow'SellerReclaims'Error'IncorrectValidityInterval) $
422-
pcontains # (ppenaltyPeriod # auctionTerms) # txInfoFields.validRange
421+
pcontains # (ppostPurchasePeriod # auctionTerms) # txInfoFields.validRange
423422

424423
------------------------------------------------------------------
425424
-- Check auction escrow state transition

0 commit comments

Comments
 (0)