Skip to content

feat(social-controllers): add intent and category fields to Trade type#8410

Open
Bigshmow wants to merge 5 commits intomainfrom
TSA-371-trade-intent-category-fields
Open

feat(social-controllers): add intent and category fields to Trade type#8410
Bigshmow wants to merge 5 commits intomainfrom
TSA-371-trade-intent-category-fields

Conversation

@Bigshmow
Copy link
Copy Markdown
Contributor

@Bigshmow Bigshmow commented Apr 9, 2026

Explanation

Add intent ("enter" | "exit") as the preferred alternative to the semi-deprecated direction field, and category (optional) to distinguish trade types (e.g. "receive" for airdrops/transfers).

TSA-371

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Updates the Trade contract and superstruct validation to require a new intent field and restrict direction/intent to enums, which may break consumers or reject older API responses that don’t include these fields.

Overview
Extends the Trade model to include required intent ('enter' | 'exit') and optional category, and narrows direction to 'buy' | 'sell'.

Moves the trade validation schema into social-types as exported TradeStruct, derives Trade via Infer, and updates SocialService position validation and tests to use the new schema.

Reviewed by Cursor Bugbot for commit 3ba3a5a. Bugbot is set up for automated code reviews on this repo. Configure here.

Bigshmow and others added 2 commits April 8, 2026 19:21
Add `intent` ("enter" | "exit") as the preferred alternative to the
semi-deprecated `direction` field, and `category` (optional) to
distinguish trade types (e.g. "receive" for airdrops/transfers).

TSA-371

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Bigshmow Bigshmow marked this pull request as ready for review April 9, 2026 01:41
@Bigshmow Bigshmow requested review from a team as code owners April 9, 2026 01:41
@Bigshmow Bigshmow enabled auto-merge April 9, 2026 02:20
@Bigshmow Bigshmow requested a review from xavier-brochard April 9, 2026 17:52
Copy link
Copy Markdown

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

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 624ed68. Configure here.

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.

2 participants