add creator key bundle management page - #1024
Merged
Conversation
- Add a creator bundle management page at `/creator/:id/bundles` (with a `/creators/:id/bundles` alias), linked from the creator dashboard. - **Create form**: select creator keys with quantities, set a discounted bundle price, and choose an expiry (1–90 days, default 14). The price is validated against a 20% price floor — bundle price must be at least 80% of list price and strictly below it. Submission sends a `create_bundle` contract call. - **Active bundles**: shows purchase counts and a live countdown per bundle. Cancelling submits `cancel_bundle`, optimistically stamping `cancelledAt` so the bundle leaves the active list immediately, with rollback on failure and a query invalidation on settle. - **Archive**: expired and cancelled bundles move here automatically, derived from a single shared ticking clock rather than a separate expiry task. - Add `bundle.service.ts` for the bundle types and paginated listing, plus `bundle.utils.ts` for pricing, validation, status, and partition helpers. - Expose `submitCreatorContractCall` from `useCreatorContractActions` so bundle hooks submit calls through the same seam as existing creator mutations. **On-chain wiring is still simulated**, as it is elsewhere in this file, so `create_bundle`/`cancel_bundle` do not hit the network yet. - List bundles via a cursor-paginated `GET /creators/:creatorId/bundles`; the endpoint shape is assumed pending a backend contract. closes accesslayerorg#984
|
@aishagbadamosi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
/creator/:id/bundles(with a/creators/:id/bundlesalias), linked from the creator dashboard.create_bundlecontract call.cancel_bundle, optimistically stampingcancelledAtso the bundle leaves the active list immediately, with rollback on failure and a query invalidation on settle.bundle.service.tsfor the bundle types and paginated listing, plusbundle.utils.tsfor pricing, validation, status, and partition helpers.submitCreatorContractCallfromuseCreatorContractActionsso bundle hooks submit calls through the same seam as existing creator mutations. On-chain wiring is still simulated, as it is elsewhere in this file, socreate_bundle/cancel_bundledo not hit the network yet.GET /creators/:creatorId/bundles; the endpoint shape is assumed pending a backend contract.closes #984
Summary
/creator/:id/bundles(with a/creators/:id/bundlesalias), linked from the creator dashboard.create_bundlecontract call.closes #984
Testing
pnpm lintpnpm buildChecklist