Skip to content

chore: pass marketCap on Trade (social-trading)#9605

Merged
zone-live merged 5 commits into
mainfrom
TSA-pass-marketCap-to-Trade-tradeStruct
Jul 23, 2026
Merged

chore: pass marketCap on Trade (social-trading)#9605
zone-live merged 5 commits into
mainfrom
TSA-pass-marketCap-to-Trade-tradeStruct

Conversation

@zone-live

@zone-live zone-live commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Explanation

Pass marketCap to Trade, meaning TradeStruct + Trade type get marketCap?: number | null..

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

Low Risk
Backward-compatible optional field on trade validation/types only; no auth, persistence, or behavior changes.

Overview
Extends Trade / TradeStruct with an optional marketCap field (number | null) so consumers can show the token’s USD market cap at trade time when the social API (Clicker) provides it.

The superstruct schema in social-types.ts is updated and Trade is still derived via Infer, so any API responses that already validate trades through TradeStruct (e.g. position trades in SocialService) accept the new property without breaking older payloads that omit it. The package changelog records the addition under Unreleased.

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

@zone-live
zone-live requested review from a team as code owners July 22, 2026 15:02
@zone-live
zone-live added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 8bf0dfc Jul 23, 2026
427 checks passed
@zone-live
zone-live deleted the TSA-pass-marketCap-to-Trade-tradeStruct branch July 23, 2026 09:12
@cursor cursor Bot mentioned this pull request Jul 23, 2026
4 tasks
pull Bot pushed a commit to dmrazzy/core that referenced this pull request Jul 23, 2026
## Explanation

Releasing a new version of social-controllers.

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Version and changelog-only release with no runtime code changes in
this PR; the documented API addition is optional and backward
compatible.
> 
> **Overview**
> Cuts **release 1143.0.0** for the core monorepo and publishes
**`@metamask/social-controllers@2.6.0`**.
> 
> The social-controllers changelog is finalized for **2.6.0**,
documenting the shipped addition of an optional **`marketCap`** on the
**`Trade`** type (and **`TradeStruct`**) for historical token market cap
at trade time from the social API
([MetaMask#9605](MetaMask#9605)). Compare links and
the `[Unreleased]` section are updated for the new tag.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
6467dbe. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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