feat: aus leaderboard preferences#9355
Draft
Bigshmow wants to merge 2 commits into
Draft
Conversation
…ngelog to PR #9355 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Adds
getLeaderboardPreferencesandsetLeaderboardPreferencestoAuthenticatedUserStorageService, backed by a new dedicated AUS namespaceGET/PUT /api/v1/preferences/leaderboardwith 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
NotificationPreferencesblob. 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 existingassets-watchlistfeature exactly (validator +assert,get/setmethods, messenger actions, exports, tests).Nothing else in the package changes; this is purely additive.
References
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