Skip to content

fix: correct sort order default to descending (#17)#20

Open
harishkotra wants to merge 1 commit intoPolymarket:mainfrom
harishkotra:fix/sorting-order-issue
Open

fix: correct sort order default to descending (#17)#20
harishkotra wants to merge 1 commit intoPolymarket:mainfrom
harishkotra:fix/sorting-order-issue

Conversation

@harishkotra
Copy link

@harishkotra harishkotra commented Feb 25, 2026

PR for fixing #17

Changed the default sort direction from ascending to descending in both commands:


Note

Low Risk
Small, localized change to request construction for list endpoints; risk is limited to potentially changing default ordering behavior in CLI output.

Overview
Fixes list-command sort direction handling by always sending an explicit ascending value to the SDK.

Across comments, events, markets, and series list flows, maybe_ascending now receives Some(ascending) instead of None when the flag is not set, aligning behavior with the CLI help text (default descending unless --ascending is provided).

Written by Cursor Bugbot for commit ed08ace. This will update automatically on new commits. Configure here.

@harishkotra harishkotra force-pushed the fix/sorting-order-issue branch from 3a8ef1d to 836513b Compare February 25, 2026 12:19
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

- Changed default sort direction from ascending to descending for markets, events, comments, and series list commands
- When --ascending flag is NOT provided: sorts in descending order (default behavior)
- When --ascending flag IS provided: sorts in ascending order (explicit override)
- Help text already stated 'Sort ascending instead of descending', implying descending is default
- Fixes issue where --ascending flag was a no-op and no way to get descending results
- Simplified conditional logic using Some(ascending) instead of if/else
@harishkotra harishkotra force-pushed the fix/sorting-order-issue branch from 836513b to ed08ace Compare February 25, 2026 12:52
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.

1 participant