Skip to content

feat: aus leaderboard preferences#9355

Draft
Bigshmow wants to merge 2 commits into
mainfrom
feat/aus-leaderboard-preferences
Draft

feat: aus leaderboard preferences#9355
Bigshmow wants to merge 2 commits into
mainfrom
feat/aus-leaderboard-preferences

Conversation

@Bigshmow

@Bigshmow Bigshmow commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Explanation

Adds getLeaderboardPreferences and setLeaderboardPreferences to AuthenticatedUserStorageService, backed by a new dedicated AUS namespace GET/PUT /api/v1/preferences/leaderboard with the blob shape { version: 1, optedOut: boolean}. This is the storage layer for the Top Traders leaderboard opt-out feature: the client persists the user's opt-out choice so the leaderboard UI can preselect the post-opt-out state on launch and across devices.

The preference is stored as its own blob rather than as a field on the existing NotificationPreferences blob. The notification-preferences blob only exists once a user has enabled notifications (it's seeded on notification setup and a full-blob write), so nesting the flag there leaves users who never touched notifications with nowhere to persist it. A dedicated blob is created-on-first-write, so opt-out persists for everyone with no coupling to notifications. The implementation mirrors the existing assets-watchlist feature exactly (validator + assert, get/set methods, messenger actions, exports, tests).

Nothing else in the package changes; this is purely additive.

References

  • Related to TSA-834 — dedicated leaderboard-preferences AUS blob.
  • Consumed by the MetaMask mobile client via TSA-830 (leaderboard opt-out client flow).
  • Depends on the corresponding backend endpoint in va-mmcx-notify-users-storage (/preferences/leaderboard), which is not yet deployed — unit tests mock the HTTP layer, so this SDK can't be exercised end-to-end until that ships. Draft until then.

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

Bigshmow and others added 2 commits July 1, 2026 21:37
…ngelog to PR #9355

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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