Skip to content

fix: validate fillAmount format before BigInt parsing - #159

Open
Phantomcall wants to merge 3 commits into
stellar-vortex-protocol:mainfrom
Phantomcall:fix/fill-amount-validation
Open

fix: validate fillAmount format before BigInt parsing#159
Phantomcall wants to merge 3 commits into
stellar-vortex-protocol:mainfrom
Phantomcall:fix/fill-amount-validation

Conversation

@Phantomcall

Copy link
Copy Markdown

Fixes ungraceful 500 error when non-numeric fillAmount is submitted to IntentsController.fill().

Changes

  • FillIntentDto already has @Matches(/^\d+$/) on fillAmount (matching CreateIntentDto pattern)
  • Added e2e test asserting POST /api/v1/intents/:id/fill with fillAmount=abc returns 400 with validation error details instead of a 500 SyntaxError from BigInt()

Verification

  • npm run lint passes
  • npm run typecheck passes
  • npm test passes
  • npm run test:e2e passes (new e2e test for non-numeric fillAmount)

Closes #65

ChainBid Developer added 2 commits July 28, 2026 02:14
Add e2e test asserting non-numeric fillAmount returns 400 with
validation error, not an ungraceful 500 from BigInt SyntaxError.
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guard BigInt(dto.fillAmount) against malformed input

1 participant