Skip to content

Commit

Permalink
refactor: remove outdated logic related to refunds
Browse files Browse the repository at this point in the history
  • Loading branch information
0xble committed Dec 4, 2023
1 parent de1b8f7 commit 2328635
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions contracts/authorities/SellPartyCardsAuthority.sol
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ contract SellPartyCardsAuthority {
SaleState memory state = _validateContribution(party, saleId, gateData);

uint96 contributionToTransfer;
(votingPower, contribution, contributionToTransfer, ) = _processContribution(
(votingPower, contributionToTransfer, ) = _processContribution(
party,
saleId,
state,
Expand Down Expand Up @@ -494,7 +494,6 @@ contract SellPartyCardsAuthority {
uint96 contributionToTransfer;
(
votingPowers[i],
contributions[i],
contributionToTransfer,
state.totalContributions
) = _processContribution(party, saleId, state, contributions[i]);
Expand Down Expand Up @@ -523,12 +522,7 @@ contract SellPartyCardsAuthority {
uint96 contribution
)
private
returns (
uint96 votingPower,
uint96 contributionUsed,
uint96 contributionToTransfer,
uint96 totalContributions
)
returns (uint96 votingPower, uint96 contributionToTransfer, uint96 totalContributions)
{
totalContributions = state.totalContributions;
uint96 maxTotalContributions = state.maxTotalContributions;
Expand Down Expand Up @@ -569,17 +563,11 @@ contract SellPartyCardsAuthority {
}
}

// Check that the contribution amount is at or above the minimum. This
// is done after `amount` is potentially reduced if refunding excess
// contribution.
// Check that the contribution amount is at or above the minimum.
if (contribution < minContribution) {
revert OutOfBoundsContributionsError(contribution, minContribution);
}

// Return contribution amount used after refund and including amount
// used for funding split. Will be emitted in `MintedFromSale` event.
contributionUsed = contribution;

// Subtract split from contribution amount if applicable.
address payable fundingSplitRecipient = state.fundingSplitRecipient;
uint16 fundingSplitBps = state.fundingSplitBps;
Expand Down

0 comments on commit 2328635

Please sign in to comment.