Repository navigation
Conversation
added 2 commits
October 17, 2026 07:26
docs/spot.md documents --limit as 'defaults to 10, max 15', but the command only rejected non-positive values, so --limit 1000 was sent to the API and silently clamped downstream. Reject values above 15 with a clear error before any network call. Closes jup-ag#22
Add a unit test for the upper bound added in 1d4bf0c and the existing lower-bound check. All 76 tests pass locally, plus fmt/lint/typecheck. Also install bun locally so the full 'bun run ci' suite is now verified before future pushes.
Author
|
Added a unit test in 877d2f2 covering the new upper bound and the existing lower bound: Full local CI also green: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22
docs/spot.mddocuments--limitforjup spot historyasdefaults to 10, max 15, but the command only rejected non-positive values.--limit 1000was passed straight through to the API and silently clamped downstream (DatapiClient.getSwapsByAddressdoesMath.min(limit, 30)), so the user never saw an error even though they asked for far more than documented.This rejects
--limit > 15before any network call, mirroring the existing lower-bound check:Verified locally:
tsc --noEmitclean,oxlint srcclean,prettier --check srcclean.bun testnot run here — bun is not installed in this environment; happy to add a unit test if the maintainers would like one.References:
--limitdefaults to 10, max 15Math.min(params.limit, 30)(silent clamp)limit <= 0)