Repository navigation
feat: add holding cap warning and enforcement feedback on buy form (#1015) - #1040
Merged
Chucks1093 merged 1 commit intoSep 28, 2026
Merged
Conversation
…ccesslayerorg#1015) Display a holding cap indicator on the buy form showing the user's current balance relative to the key's maximum holding cap, and block submission when the purchase would exceed it. - Add HoldingCapIndicator component with accessible progress bar and tooltip - Provide inline warnings as purchase quantity changes - Disable buy button with cap exceeded / reached messages - Hide holding cap indicator when cap is unlimited or unconfigured - Add comprehensive unit and integration test coverage
|
@Ahbiz 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! 🚀 |
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.
Summary
Closes #1015
Display a holding cap indicator on the buy form showing the user's current balance relative to the key's maximum holding cap, and block submission when the purchase would exceed it.
Scope & Changes
HoldingCapIndicatorshowing current balance vs maximum holding cap with an accessible progress bar (role="progressbar").Holding Cap ExceededorHolding Cap Reachedmessages when limit is reached or exceeded, and clamps theMAXbutton to the remaining cap allowance.AccessibleInfoTriggertooltip explaining the creator-configured holding cap policy to promote fair distribution and prevent ownership concentration.CourseandKeyConfiginterfaces, and addedexceeds-holding-capvalidation invalidateTradeQuantity.Testing
pnpm lintpnpm buildHoldingCapIndicator.test.tsx(9 passed)TradeDialog.holdingCap.test.tsx(10 passed)tradeQuantityValidation.holdingCap.test.ts(7 passed)BuySellKeyFlow.test.tsx(11 passed)CreatorDetailPage.buyKeyFlow.integration.test.tsx(3 passed)Checklist