Skip to content

Latest commit

 

History

History
96 lines (63 loc) · 5.99 KB

File metadata and controls

96 lines (63 loc) · 5.99 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Changed

  • Bump @metamask/controller-utils from ^12.0.0 to ^12.2.0 (#8774, #9058, #9083)
  • Bump @metamask/profile-sync-controller from ^28.0.2 to ^28.1.1 (#8783, #8912)
  • Bump @metamask/base-data-service from ^0.1.2 to ^0.1.3 (#8799)

Changed

  • Bump @metamask/messenger from ^1.1.1 to ^1.2.0 (#8632)
  • Bump @metamask/base-data-service from ^0.1.1 to ^0.1.2 (#8755)
  • Bump @metamask/controller-utils from ^11.20.0 to ^12.0.0 (#8755)

Added

  • Add SocialService.fetchPositionById method exposing GET /v1/traders/position/:positionId, returning a single Position by ID (#8602)

Added

  • Add positionId field to Position type and PositionStruct validation schema (#8576)

Changed

  • BREAKING: SocialService.follow, SocialService.unfollow, and SocialController.followTrader, SocialController.unfollowTrader no longer accept an addressOrUid option. The caller is identified server-side from the JWT sub claim carried in the Authorization header. (#8520)
  • BREAKING: SocialService.fetchFollowing and SocialController.updateFollowing now take no arguments (previously { addressOrUid }). (#8520)
  • BREAKING: Remove FetchFollowingOptions type export (no longer needed). (#8520)
  • SocialService now calls PUT /v1/users/me/follows, DELETE /v1/users/me/follows, and GET /v1/users/me/following (previously /v1/users/:addressOrUid/...). (#8520)

Uncategorized

  • chore: Format changelogs with Oxfmt (#8442)

Changed

  • BREAKING: SocialServiceMessenger now requires AuthenticationController:getBearerToken as an allowed action — all consumers must provide this action via messenger delegation
  • All SocialService API requests now include a JWT bearer token in the Authorization header, obtained via AuthenticationController:getBearerToken (#8485)

Added

  • Add optional tokenImageUrl field to Position type and PositionStruct validation schema (#8448)
  • Add optional medianHoldMinutes field to TraderStats type and TraderStatsStruct validation schema (#8448)
  • Add intent and optional category fields to Trade type (#8410)
  • Export TradeStruct superstruct schema; derive Trade type via Infer (#8410)
  • Narrow direction to 'buy' | 'sell' and intent to 'enter' | 'exit' on Trade type (#8410)
  • Add followingProfileIds to SocialControllerState — stores Clicker profile IDs alongside existing followingAddresses (#8459)

Changed

  • Bump @metamask/messenger from ^1.1.0 to ^1.1.1 (#8373)
  • Bump @metamask/base-controller from ^9.0.1 to ^9.1.0 (#8457)

Fixed

  • Fix fetchClosedPositions using v2 URL instead of v1, which caused 404 errors since the closed positions endpoint only exists on v1 (#8448)

Added

  • Initial release (#8321, #8335, #8337)
    • Add SocialService data service wrapping social-api endpoints with superstruct response validation
      • Add methods fetchLeaderboard, fetchTraderProfile, fetchOpenPositions, fetchClosedPositions, fetchFollowers, fetchFollowing, follow, unfollow
    • Add SocialController extending BaseController with messenger actions for state management
      • updateLeaderboard — fetches leaderboard and persists entries to state
      • followTrader — follows traders and updates following addresses in state
      • unfollowTrader — unfollows traders and removes addresses from state
      • updateFollowing — fetches following list and replaces addresses in state