Add a quorum threshold configuration input on the creator dashboard governance settings - #906
Merged
Merged
Conversation
accesslayerorg#828) Introduce a Governance tab on the creator dashboard with a Quorum Settings section: a 1-50% slider pre-set to the current quorumBps from the key detail API, with the selected value shown as both a percentage and basis points, submitted via the set_quorum_bps contract call. The mutation invalidates the creator detail query and drops the course cache entry so the slider reflects the updated quorum without reload. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
The accesslayerorg#898 merge appended a second implementation to KeySimulationTool.tsx, SlippageToleranceSelector.tsx and slippageTolerance.utils.ts (and spliced imports into interfaces), leaving the tree unbuildable. Keep the implementation each production consumer is wired to and drop the orphaned duplicates and their test suites so tsc and the test runner pass again. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
5 tasks
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.
Closes #828
Summary
Adds a Quorum Settings section to the creator dashboard's governance tab, letting creators configure the minimum participation threshold for their proposals via a percentage slider, backed by the set_quorum_bps contract call.
Changes
Added a Quorum Settings panel to the governance tab on the creator dashboard
Fetches the current quorum value (quorumBps) from the key detail API on mount and pre-sets the slider to that value
Slider is constrained to a 1%–50% range (translated to/from basis points for the contract call)
Displays the current value as both a percentage and in basis points beneath the slider, updating live as the slider moves
On submit, calls set_quorum_bps with the new value; shows a success toast once the transaction confirms
On confirmation, updates the slider/display in place from the new on-chain value — no page reload required
Testing
Slider loads pre-set to the creator's current quorum value
Slider cannot be dragged below 1% or above 50%
Displayed bps value matches the percentage shown (e.g., 25% → 2500 bps)
Submitting triggers set_quorum_bps with the correct bps value
Success toast appears only after contract confirmation, not on submit
After confirmation, the slider reflects the new value without a manual refresh
Error state handled if the contract call fails (toast or inline error, no silent failure)