Skip to content

Commit

Permalink
disable selling 0 party cards
Browse files Browse the repository at this point in the history
  • Loading branch information
arr00 committed Jan 3, 2024
1 parent a6295ff commit cce0ea5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/authorities/BondingCurveAuthority.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ contract BondingCurveAuthority {
error EthTransferFailed();
error ExcessSlippage();
error AddAuthorityProposalNotSupported();
error SellZeroPartyCards();

event TreasuryFeeUpdated(uint16 previousTreasuryFee, uint16 newTreasuryFee);
event PartyDaoFeeUpdated(uint16 previousPartyDaoFee, uint16 newPartyDaoFee);
Expand Down Expand Up @@ -311,6 +312,10 @@ contract BondingCurveAuthority {
* @param tokenIds The token ids to sell
*/
function sellPartyCards(Party party, uint256[] memory tokenIds, uint256 minProceeds) external {
if (tokenIds.length == 0) {
revert SellZeroPartyCards();
}

PartyInfo memory partyInfo = partyInfos[party];

if (partyInfo.creator == address(0)) {
Expand Down

0 comments on commit cce0ea5

Please sign in to comment.