Skip to content

feat: resolved frontend issues - #899

Merged
Chucks1093 merged 3 commits into
accesslayerorg:devfrom
BaseDev-Eth:dev
Aug 31, 2026
Merged

Chucks1093 merged 3 commits into
accesslayerorg:devfrom
BaseDev-Eth:dev

Conversation

@BaseDev-Eth

Copy link
Copy Markdown
Contributor

fd4b615 feat(dashboard): add max buy quantity configuration input (Closes #888) – src/components/common/MaxBuyQuantityPanel.tsx:1, src/hooks/useCreatorContractActions.ts:105, src/pages/CreatorDashboardPage.tsx:6
Max Buy Per Transaction section in settings tab shows maxBuyQuantity from courseService.getCourse value, input 1-10000 blank = 0 on-chain, calls set_max_buy_quantity via useSetMaxBuyQuantityMutation with success toast, helper text Limits the number of keys a single wallet can buy in one transaction.
183b309 feat(simulation): add key simulation tool (Closes #887) – src/utils/priceImpact.utils.ts:1, src/components/common/KeySimulationTool.tsx:1, src/services/course.service.ts:317
calculatePriceImpact = (simulated_price - spot_price)/spot_price100, formatPriceImpact shows +10.00% / 0.00%, debounced fetch 300ms via courseService.simulateBuy GET /keys/:keyId/simulate?quantity=N, skeleton data-testid="simulation-skeleton" while loading, error Unable to simulate price hides data-testid="price-impact", quantity input data-testid="simulation-quantity-input".
337e7a4 feat(batch-buy): add simulate endpoint calls (Closes #886) – src/components/common/BatchBuyModal.tsx:1
Per-row GET /keys/:keyId/simulate?quantity=N with 300ms debounce on handleQuantityChange, per-key price data-testid="per-key-price-${idx}" and subtotal data-testid="row-subtotal-${idx}", overall data-testid="batch-total" sums simulated totals, spinner data-testid="simulation-spinner-${idx}
" per row, submit data-testid="batch-buy-confirm" disabled while anySimulationPending.

…rorg#888)

- Add MaxBuyQuantityPanel with 1–10000 number input (blank = no limit)
- Show current maxBuyQuantity fetched from key detail API
- Submit via set_max_buy_quantity contract function
- Show helper text 'Limits the number of keys a single wallet can buy in one transaction'
- Add useSetMaxBuyQuantityMutation with success toast and query invalidation
…on (accesslayerorg#887)

- Add price impact calculation (simulated_price - spot_price) / spot_price * 100
- Add KeySimulationTool with debounced fetch (300ms), loading skeleton and error handling
- Show +10.00% for positive impact, 0.00% for zero impact
- Show 'Unable to simulate price' on fetch error and hide impact value
- Add simulateBuy endpoint GET /keys/:keyId/simulate?quantity=N
…sslayerorg#886)

- Call GET /keys/:keyId/simulate?quantity=N on quantity change with 300ms debounce
- Display per-key price and row subtotal next to each quantity input
- Show overall batch total summing all row subtotals
- Show loading spinner per row while simulation is fetching
- Disable batch submit button while any simulation is pending
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@BaseDev-Eth 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 5cb317e into accesslayerorg:dev Aug 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants