Skip to content

feat: add launch penalty input to creator dashboard settings tab - #839

Merged
Chucks1093 merged 2 commits into
accesslayerorg:devfrom
Moh-dakai:feat/launch-penaltys-ui
Aug 29, 2026
Merged

feat: add launch penalty input to creator dashboard settings tab#839
Chucks1093 merged 2 commits into
accesslayerorg:devfrom
Moh-dakai:feat/launch-penaltys-ui

Conversation

@Moh-dakai

Copy link
Copy Markdown
Contributor

Adds a Launch Penalty section to the creator dashboard settings tab so creators can configure the early-sell penalty
fee via the set_launch_penalty contract call.

Changes

  • Course interface — added launchPenaltyBps?: number field (basis points, 0–2000)
  • useSetLaunchPenaltyMutation — new mutation hook that calls set_launch_penalty, invalidates the creator detail query
    on success, and shows a success toast
  • LaunchPenaltyPanel — new form component with a 0–20% number input pre-filled from launchPenaltyBps, inline
    validation, helper text ("Applied to sells within the first 7 days after key creation"), and a submit button; input
    re-syncs with the fetched value after a successful save so the updated penalty is reflected without a page reload
  • CreatorDashboardPage — wires LaunchPenaltyPanel into the settings tab as a new card section below Auction Setup

Acceptance criteria met

  • ✅ Current penalty value pre-filled on mount (converts bps → percentage for display)
  • ✅ Input constrained to 0–20% with validation messages
  • ✅ Helper text shown below the input
  • ✅ Success toast shown after contract confirmation
  • ✅ Updated penalty reflected in the input without a page reload (useEffect syncs on launchPenaltyBps change)

Testing

  • pnpm lint — passes
  • tsc -b — passes (vite build blocked by a pre-existing @tailwindcss/oxide native binding issue in the dev
    environment, unrelated to this change)

closes #830

- Add launchPenaltyBps field to Course interface
- Add useSetLaunchPenaltyMutation for set_launch_penalty contract call
- Add LaunchPenaltyPanel component (0-20% input, helper text, validation)
- Wire LaunchPenaltyPanel into creator dashboard settings tab
- Success toast shown on contract confirmation
- Input pre-filled from launchPenaltyBps and synced after save
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Moh-dakai 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! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit d187105 into accesslayerorg:dev Aug 29, 2026
1 check failed
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.

Add a launch penalty configuration input on the creator dashboard settings tab

3 participants