@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bananapus/distributor-v6",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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
  }