@@ -64,6 +64,9 @@ contract OpenEditionERC721FlatFee is
6464 /// @dev Max bps in the thirdweb system.
6565 uint256 private constant MAX_BPS = 10_000 ;
6666
67+ address public constant DEFAULT_FEE_RECIPIENT = 0x1Af20C6B23373350aD464700B5965CE4B0D2aD94 ;
68+ uint16 private constant DEFAULT_FEE_BPS = 250 ;
69+
6770 /*///////////////////////////////////////////////////////////////
6871 Constructor + initializer logic
6972 //////////////////////////////////////////////////////////////*/
@@ -157,14 +160,16 @@ contract OpenEditionERC721FlatFee is
157160 uint256 platformFees;
158161 address platformFeeRecipient;
159162
163+ uint256 platformFeesTw = (totalPrice * DEFAULT_FEE_BPS) / MAX_BPS;
164+
160165 if (getPlatformFeeType () == IPlatformFee.PlatformFeeType.Flat) {
161166 (platformFeeRecipient, platformFees) = getFlatPlatformFeeInfo ();
162167 } else {
163168 (address recipient , uint16 platformFeeBps ) = getPlatformFeeInfo ();
164169 platformFeeRecipient = recipient;
165170 platformFees = ((totalPrice * platformFeeBps) / MAX_BPS);
166171 }
167- require (totalPrice >= platformFees, "price less than platform fee " );
172+ require (totalPrice >= platformFees + platformFeesTw , "price less than platform fee " );
168173
169174 bool validMsgValue;
170175 if (_currency == CurrencyTransferLib.NATIVE_TOKEN) {
@@ -176,8 +181,14 @@ contract OpenEditionERC721FlatFee is
176181
177182 address saleRecipient = _primarySaleRecipient == address (0 ) ? primarySaleRecipient () : _primarySaleRecipient;
178183
184+ CurrencyTransferLib.transferCurrency (_currency, _msgSender (), DEFAULT_FEE_RECIPIENT, platformFeesTw);
179185 CurrencyTransferLib.transferCurrency (_currency, _msgSender (), platformFeeRecipient, platformFees);
180- CurrencyTransferLib.transferCurrency (_currency, _msgSender (), saleRecipient, totalPrice - platformFees);
186+ CurrencyTransferLib.transferCurrency (
187+ _currency,
188+ _msgSender (),
189+ saleRecipient,
190+ totalPrice - platformFees - platformFeesTw
191+ );
181192 }
182193
183194 /// @dev Transfers the NFTs being claimed.
0 commit comments