Skip to content

Commit 7206788

Browse files
committed
fix issue with funder funding more than max in more than one process
1 parent 47afedf commit 7206788

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/StageRaise.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ contract StageRaise {
261261
if (fundingAmountUSD < projectById[_projectId].basics.minFundingUSD) {
262262
revert StageRaise__FundingAmountBelowMinimum();
263263
}
264-
if (fundingAmountUSD > projectById[_projectId].basics.maxFundingUSD) {
264+
265+
266+
uint256 funderCurrentContribution = getUSDValue(projectById[_projectId].contributorsToAmountFunded[msg.sender]);
267+
if ((fundingAmountUSD + funderCurrentContribution) > projectById[_projectId].basics.maxFundingUSD) {
265268
revert StageRaise__FundingAmountAboveMaximum();
266269
}
267270

0 commit comments

Comments
 (0)