@bananapus/distributor-v6 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/JBDistributor.sol +3 -3
package/package.json
CHANGED
package/src/JBDistributor.sol
CHANGED
|
@@ -559,10 +559,10 @@ abstract contract JBDistributor is IJBDistributor {
|
|
|
559
559
|
|
|
560
560
|
uint256 claimAmount = mulDiv(vesting.amount, MAX_SHARE - vesting.shareClaimed - lockedShare, MAX_SHARE);
|
|
561
561
|
|
|
562
|
-
// Update to reflect the amount claimed.
|
|
563
|
-
vestings[vestedIndex].shareClaimed = MAX_SHARE - lockedShare;
|
|
564
|
-
|
|
565
562
|
if (claimAmount != 0) {
|
|
563
|
+
// Only update the claimed share when a nonzero transfer will occur.
|
|
564
|
+
// This keeps dust entries unconsumed so future claims can accumulate enough for a nonzero amount.
|
|
565
|
+
vestings[vestedIndex].shareClaimed = MAX_SHARE - lockedShare;
|
|
566
566
|
totalTokenAmount += claimAmount;
|
|
567
567
|
emit Collected(hook, tokenId, token, claimAmount, vesting.releaseRound);
|
|
568
568
|
}
|