fix: validate partial project payments against remaining amount - #1472
fix: validate partial project payments against remaining amount#1472sachinacharyaa wants to merge 1 commit into
Conversation
|
@sachinacharyaa is attempting to deploy a commit to the Superteam Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 15 seconds You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What does this PR do?
This PR adds secure partial-payment support for project payments.
expectedAmount <= 0from bypassing payment amount validation.Where should the reviewer start?
Start with:
src/features/sponsor-dashboard/utils/paymentRPCValidation.tsThen review the project payment verification flow, specifically how the remaining project amount is calculated and passed to
validatePayment.Finally, review the tests covering full, partial, zero, and excessive project payments.
How should this be manually tested?
Any background context you want to provide?
Previously, project payment verification could rely on an
expectedAmountof0, which caused the amount validation to be skipped.This change makes partial project payments explicit and validates them against the server-derived remaining amount while preserving exact-match behavior for bounty and grant payments.
This also addresses Finding 3, where
validatePaymentcould skip amount checks whenexpectedAmount <= 0.What are the relevant issues?
Finding 3 —
validatePaymentskips amount checks whenexpectedAmount <= 0.Related to the partial-payment findings for project payment verification.
Screenshots (if appropriate)
Not applicable — this is a backend/payment-validation change with no user-facing UI changes.