We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fa63579 + e45b39f commit a793506Copy full SHA for a793506
src/WeSplit.sol
@@ -120,7 +120,8 @@ contract WeSplit is UUPSUpgradeable, WeSplitStructure {
120
for (uint256 i; i < sParticipants.length; i++) weightsSum += split.weights[i];
121
for (uint256 i; i < sParticipants.length; i++) {
122
uint256 shareOfAmount = (sAmount * split.weights[i]).divUp(weightsSum);
123
- IERC20(sToken).transferFrom(sParticipants[i], address(this), shareOfAmount);
+ if (shareOfAmount != 0)
124
+ IERC20(sToken).transferFrom(sParticipants[i], address(this), shareOfAmount);
125
}
126
IERC20(sToken).transfer(split.receiver, sAmount);
127
split.amount = 0;
0 commit comments