Skip to content

Validation hardening: split math, DTO cross-field checks, and strict body whitelisting - #217

Merged
chonilius merged 1 commit into
MergeFi:mainfrom
OlaGreat:fix/issue-169-170-171-172-validation-hardening
Aug 26, 2026
Merged

Validation hardening: split math, DTO cross-field checks, and strict body whitelisting#217
chonilius merged 1 commit into
MergeFi:mainfrom
OlaGreat:fix/issue-169-170-171-172-validation-hardening

Conversation

@OlaGreat

@OlaGreat OlaGreat commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Hardens several validation gaps across the escrow and DTO layers:

Closes #169
Closes #170
Closes #171
Closes #172

Test plan

  • split-math.util.spec.ts covers the new not-summing-to-100 rejection for apportionBasisPoints
  • Existing apportionBasisPoints/splitStroops tests still pass (no behavior change for valid input)
  • Full suite run (blocked locally — no registry access in this environment; CI should confirm)

…ields

- apportionBasisPoints now throws BadRequestException when its input
  percentages don't sum to ~100 (matching splitStroops's existing
  precondition guard) instead of silently force-normalizing an
  arbitrarily wrong input to a valid-looking 10,000 bps output. Adds
  a regression test for the not-summing-to-100 case.
- Global ValidationPipe now sets forbidNonWhitelisted: true so requests
  with unrecognized body fields are rejected with a 400 instead of
  silently having those fields stripped.

Closes MergeFi#169
Closes MergeFi#170
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

@OlaGreat is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@OlaGreat 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

@chonilius
chonilius merged commit 7bc1347 into MergeFi:main Aug 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment