Skip to content

fix: cap transaction page size - #1407

Open
silentgeckoaudit3801 wants to merge 3 commits into
LabsCrypt:mainfrom
silentgeckoaudit3801:fix-transaction-page-size-cap
Open

fix: cap transaction page size#1407
silentgeckoaudit3801 wants to merge 3 commits into
LabsCrypt:mainfrom
silentgeckoaudit3801:fix-transaction-page-size-cap

Conversation

@silentgeckoaudit3801

Copy link
Copy Markdown

Summary

  • reduce the transaction list MAX_LIMIT from 500 to 50
  • add a static regression test that locks the intended cap and rejects the old large value

Fixes #1335.

Validation

  • Static source inspection only; no local dependency install or test execution in this environment.

@ogazboiz ogazboiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fix itself is right, MAX_LIMIT 500 to 50 matches the issue and the Math.min path is verified. one tiny thing now blocks it: CI lint fails with a missing trailing newline in backend/src/controllers/tests/transactionControllerLimits.test.ts (prettier "Insert newline" at 12:4). run:

cd backend && npx prettier --write src/controllers/__tests__/transactionControllerLimits.test.ts && git commit -am "chore: prettier" && git push

and this merges.

if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

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.

[Backend] Transaction endpoint max page size is set an order of magnitude too high

2 participants