From 4e7257d2e6dbe6f2395039a7b2301c2c8d3036c6 Mon Sep 17 00:00:00 2001 From: Brian Le Date: Mon, 4 Dec 2023 13:30:16 -0500 Subject: [PATCH] move up `minContribution` earlier since no refunds anymore --- contracts/authorities/SellPartyCardsAuthority.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/authorities/SellPartyCardsAuthority.sol b/contracts/authorities/SellPartyCardsAuthority.sol index 50cfcf53..842eb4d9 100644 --- a/contracts/authorities/SellPartyCardsAuthority.sol +++ b/contracts/authorities/SellPartyCardsAuthority.sol @@ -539,6 +539,11 @@ contract SellPartyCardsAuthority { revert SaleInactiveError(); } + // Check that the contribution amount is at or above the minimum. + if (contribution < minContribution) { + revert OutOfBoundsContributionsError(contribution, minContribution); + } + // Check that the contribution amount is at or below the maximum. uint96 maxContribution = state.maxContribution; if (contribution > maxContribution) { @@ -563,11 +568,6 @@ contract SellPartyCardsAuthority { } } - // Check that the contribution amount is at or above the minimum. - if (contribution < minContribution) { - revert OutOfBoundsContributionsError(contribution, minContribution); - } - // Subtract split from contribution amount if applicable. address payable fundingSplitRecipient = state.fundingSplitRecipient; uint16 fundingSplitBps = state.fundingSplitBps;