Skip to content

Commit 6baf394

Browse files
committed
Fix double basis points calculation in ModulesBase
1 parent 489cea8 commit 6baf394

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

packages/contracts/test/apps/modules/ModulesBase.sol

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,13 +325,8 @@ contract ModulesBase is BaseSetup, ISubscriptionModuleBase {
325325

326326
function _calculateProtocolFee(uint256 basePrice) internal view returns (uint256) {
327327
uint256 protocolFee = platformRequirements.getMembershipFee(); // Min fee for 1 ether
328-
329-
if (
330-
BasisPoints.calculate(basePrice, platformRequirements.getMembershipBps()) > protocolFee
331-
) {
332-
protocolFee = BasisPoints.calculate(basePrice, platformRequirements.getMembershipBps());
333-
}
334-
328+
uint256 bpsFee = BasisPoints.calculate(basePrice, platformRequirements.getMembershipBps());
329+
if (bpsFee > protocolFee) return bpsFee;
335330
return protocolFee;
336331
}
337332

0 commit comments

Comments
 (0)