Repository navigation
feat: price impact slider, fee tier badge, creator social section - #1191
Merged
Chucks1093 merged 3 commits intoOct 19, 2026
Merged
Conversation
added 3 commits
October 19, 2026 12:03
Adds computeBuyCostPreview/computeSellPayoutPreview, a bigint curve engine cross-validated against the existing float curve (computeBuyCost/computeSellRevenue), plus slippage classification and a worst-case-buffer helper. PriceImpactSlider composes these into an interactive quantity slider showing gross/net cost or payout, the resulting price, a colour-coded slippage badge (green under 1%, yellow 1-5%, red over 5%), and the worst-case XLM figure for buys. Reduced scope from the full issue: the canvas sparkline chart and the strict <16ms/1000-slider-move performance assertion are not included. The curve engine, slider, and fee/slippage breakdown it was built to drive are the parts this covers. Closes accesslayerorg#755
Adds classifyVolumeDiscountTier (bronze/silver/gold, by cumulative wallet volume), getTierDiscountBps, and computeTierProgress, plus two presentational components: VolumeTierBadge (the badge itself, with a tooltip showing volume needed for the next tier, rendering nothing for a wallet with no tier) and TierFeeBreakdown (base fee / tier discount / final fee for the trade confirmation screen). Both take the wallet's tier and cumulative volume as props rather than fetching them, since this repo has no existing endpoint for wallet-level trading volume; wiring the fetch-on-connect + session cache is left to whoever adds that endpoint, and these components compose with it either way. Closes accesslayerorg#1102
… page The creator key detail page already showed avatar, display name, and bio via CreatorProfileHeader, but never surfaced published social links (Twitter, website, Discord) or a way to reach the creator's full public profile page — both exist already, just not here. Adds CreatorSocialSection, reusing the existing resolveCreatorSocialLinks/CreatorProfileSocialLinks (the same ones the public profile page already uses) so the links stay consistent across both pages, plus a link to /creator/<address>/profile. Renders nothing extra when the creator hasn't published any links. Closes accesslayerorg#1103
|
@uche001-dev 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.
Summary
Three scoped deliverables for the assigned issues. #403 is already fully shipped on dev, see notes below.
#403 - Sell proceeds estimate helper
Already fully implemented on dev:
estimateSellProceedsinkeyPriceDisplay.utils.tscomputes the estimate,SellFeeBreakdown.tsxdisplays it labeled "Estimated proceeds (approximate)" before the confirmation step, and shows "Estimated proceeds unavailable" when it can't be computed - all three acceptance criteria are met, with existing test coverage inTradeDialog.sellPayoutDisplay.test.tsxandTradeDialog.slippageTolerance.test.tsx. No changes needed; not included in this PR.#755 - Bonding curve price impact simulation (reduced scope, agreed with maintainer)
Given the issue's full scope (canvas sparkline chart with
requestAnimationFrame, a strict <16ms/1000-slider-move performance assertion, 24h ETA) versus the other three issues in this batch, this PR covers the core deliverable at reduced scope:computeBuyCostPreview/computeSellPayoutPreviewinbondingCurve.utils.ts: a bigint curve engine with the exact signatures requested ((currentSupply, amount, feeBps)returning gross/fee/net/newPrice), cross-validated against the existing float curve (computeBuyCost/computeSellRevenue) within a 1-stroop tolerance across supplies 0/1/10/100/1000computeSlippagePercent+classifySlippageSeverity: the green <1% / yellow 1-5% / red >5% slippage badge classificationapplyWorstCaseBuffer: the configurable worst-case XLM buffer (default 0.5%)PriceImpactSlider: an interactive quantity slider (numeric input + range, synced) that re-runs the curve engine on every change and renders gross/net cost or payout, new price, the colour-coded slippage badge, and the worst-case XLM figure for buysNot included: the canvas sparkline chart and the strict 16ms/1000-move performance test. Happy to follow up with those in a separate PR if still wanted.
#1102 - Fee discount tier badge and breakdown
Adds
classifyVolumeDiscountTier(bronze/silver/gold by cumulative wallet volume, distinct from the existing per-tradegetVolumeTierDiscountBps),getTierDiscountBps, andcomputeTierProgress(volume needed for the next tier).VolumeTierBadgerenders the badge with a tooltip showing the distance to the next tier, and renders nothing for a wallet with no tier (per the "no badge for wallets with no discount tier" acceptance criterion).TierFeeBreakdownshows base fee / tier discount / final fee for the trade confirmation screen.Scope note: this repo has no existing endpoint for a wallet's cumulative trading volume, so these components take
tier/cumulativeVolumeStroopsas props rather than fetching them. Wiring the "fetch on wallet connect, cache for session" part is left for whoever adds that endpoint; these compose with it either way, including on the wallet profile page per the issue's scope.#1103 - Creator social profile section on the key detail page
The key detail page already showed avatar, display name, and bio via
CreatorProfileHeader, but never surfaced the creator's published social links or a way to reach their full public profile page - both already exist and are already used on the separate creator public profile page. AddedCreatorSocialSection, reusing the existingresolveCreatorSocialLinks/CreatorProfileSocialLinksso the links stay consistent across both pages, plus a link to/creator/<address>/profile. Intentionally does not duplicate the avatar/name/bio the header already renders.Test plan
vitest runon all new/touched test files - 118 passed, 1 pre-existing unrelated failure (confirmed via stash/diff against a cleandevcheckout - same failure, same count, before and after this branch)tsc -b --noEmit- cleaneslint- cleanprettier --check- cleanCreatorDetailPage.*suites after wiring inCreatorSocialSection(caught and fixed one real regression during development - an initial version duplicated the bio text already shown by the header, breaking an existing test's text-uniqueness assumption - before this PR)Closes #755
Closes #1102
Closes #1103