From 2b59923059fac013b4fe714a873551814db0d33b Mon Sep 17 00:00:00 2001 From: Hongrui Fang Date: Mon, 28 Nov 2022 17:22:47 +0800 Subject: [PATCH] improve readability --- agora/Agora/Stake/Redeemers.hs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/agora/Agora/Stake/Redeemers.hs b/agora/Agora/Stake/Redeemers.hs index e02e87f..3c0dd37 100644 --- a/agora/Agora/Stake/Redeemers.hs +++ b/agora/Agora/Stake/Redeemers.hs @@ -293,15 +293,12 @@ premoveLocks = createdAt ) = let notInCooldown = createdAt + unlockCooldown #<= lowerBound - in foldl1 - (#||) - [ shouldRemoveAllLocks - , -- Fail the transaction if a voter lock is in cooldown.∏ - passert - "Voter lock shouldn't be in cooldown" - notInCooldown - (pconstant True) - ] + in pif shouldRemoveAllLocks (pconstant True) $ + -- Fail the transaction if a voter lock is in cooldown. + passert + "Voter lock shouldn't be in cooldown" + notInCooldown + (pconstant True) shouldRemoveLock = flip