Skip to content

fix: prevent race condition in payout status and fix fee rounding drift - #1308

Merged
Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
ritaifeoluwa:fix/payout-status-race-and-fee-rounding
Oct 19, 2026
Merged

Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
ritaifeoluwa:fix/payout-status-race-and-fee-rounding

Conversation

@ritaifeoluwa

@ritaifeoluwa ritaifeoluwa commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1023
Closes #1021
Closes #1012
Closes #1007

What changed

How to test

  • Run npm test to verify all tests pass
  • Verify concurrent payout status updates are safe
  • Verify fee calculations have no rounding drift

Closes Smartdevs17#1023
Closes Smartdevs17#1021

- Smartdevs17#1023: Added optimistic locking with version field to ScheduledPayout
  to prevent concurrent status update corruption. All setStatus calls
  now verify version before updating.
- Smartdevs17#1021: Added roundMinor() helper to round fee calculations to integer
  minor units (cents) preventing floating-point rounding drift.
@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

@ritaifeoluwa is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@ritaifeoluwa Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Smartdevs17
Smartdevs17 merged commit f6dd704 into Smartdevs17:main Oct 19, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants