Skip to content

Commit 666833a

Browse files
committed
code review comments
1 parent 4fb7a0e commit 666833a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

contracts/UFragmentsPolicy.sol

+4-3
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,12 @@ contract UFragmentsPolicy is Ownable {
385385
maxSupplyInHistory = epochSupply;
386386
}
387387
}
388-
int256 allowedSupplyMinimum = maxSupplyInHistory
388+
int256 allowedMin = maxSupplyInHistory
389389
.mul(ONE.sub(tolerableDeclinePercentage))
390390
.div(ONE);
391-
newSupply = (newSupply > allowedSupplyMinimum) ? newSupply : allowedSupplyMinimum;
392-
require(newSupply <= currentSupply);
391+
if (newSupply < allowedMin) {
392+
newSupply = allowedMin;
393+
}
393394
}
394395

395396
return newSupply.sub(currentSupply);

0 commit comments

Comments
 (0)