feat: add shop credits support to the navbar and publication flow - #812
Draft
RocioCM wants to merge 4 commits into
Draft
feat: add shop credits support to the navbar and publication flow#812RocioCM wants to merge 4 commits into
RocioCM wants to merge 4 commits into
Conversation
…n flow Add a new method to CreditsService that enables paying wearable collection publishing fees with USD-pegged shop credits via POST /credits/authorize-publication. Unlike the existing useCreditsCollectionManager (which requires pre-existing Credit[] objects), this method gets the credit and external call signature atomically from a single authenticated endpoint, using ADR-44 signed-fetch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The credits-server endpoint already returns a `usd` field with `balanceCents` and `credits` when the feature flag is on. Update the type to capture it so consumers (builder) can read the shop credits balance. Also prefix unused `walletAddress` param. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Review: feat: add shop credits support to the navbar and publication flowFiles: 4 changed (+41/−1) SummarySmall, focused PR that wires shop credits (USD-pegged) through the dapps layer. Derives What looks good
Pipeline failureThe This is expected — the prop is being added in No issues found. LGTM ✅ 🤖 Generated with Claude Code |
decentraland-bot
approved these changes
Jul 31, 2026
decentraland-bot
left a comment
Contributor
There was a problem hiding this comment.
No p0/p1/p2 findings. SSE saga preservation of the usd block is correct and well-tested. LGTM.
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.
Wires shop credits (the USD-pegged shop currency) through the dapps layer, for decentraland/shop#206. Three pieces:
CreditsResponsegains the optionalusd: { balanceCents, credits }block that credits-server now returns on the same/users/:address/creditsendpoint.Navbar2derivesshopCreditsBalancefrom that block — same pattern andwithCreditsgate as the existing marketplacecreditsBalance, zero additional requests.onClickShopCreditsstays a passthrough so each app sets its own top-up destination. As a side effect of the decentraland-ui2 bump,showManaBalancesInNavbarbecomes properly typed (marketplace can drop its@ts-expect-error).{ credits, totalCredits }, so the saga now preserves the previoususdblock when a push arrives without it — otherwise the shop credits balance clears on the first SSE update. Covered insagas.spec.ts. Extending the SSE payload server-side is a follow-up.useShopCreditsCollectionManagersupports the shop credits publication flow (builder publishing fees).Draft until decentraland/ui2#461 is released — the ui2 dependency needs bumping to that version for the new
NavbarPropsto typecheck.