Fee discount tiers page: inconsistent number formatting #46
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On the fee discount tiers page, threshold amounts are formatted in a way that is hard to read: decimal precision is inconsistent (e.g. three decimal places in some places, one in others), which makes the tiers confusing at a glance.
Expected / desired behavior
Standardize how tier thresholds are displayed so users can scan them quickly.
Ideas discussed (not mutually exclusive):
kshorthand — show full values with grouping instead (e.g. 1,500 rather than abbreviated forms).Scope
Frontend: fee discount tiers UI (number formatting only; behavior of tiers unchanged unless a bug is found during the pass).
mentioned in commit
da14eae59fImplementation (fee tier number formatting)
Problem: Tier CL8Y thresholds used
formatTokenAmount→ significant figures + K/M/T abbreviations, so values mixed styles (e.g. extra decimal places vs shorthand).Change: Added
formatTokenAmountGrouped()infrontend-dapp/src/utils/formatAmount.ts: full amounts with en-US thousands grouping, no K/M shorthand, no decimal point for whole-token thresholds (exact conversion viafromRawAmount).TiersPageformatCl8ynow uses this for tier rows and the "How it works" table.Tests: Unit tests in
formatAmount.test.ts;npm run buildand Vitest pass locally.Commit:
da14eaeonmain.Leaving this issue open for QA.
/cc @brouie Please verify on Fee Tiers (
/tiers): thresholds read as full grouped numbers (e.g.3,500,7,500) and stay consistent between the tier list and the summary table.Follow-up: tiers keep K/M/B/T again; only change is dropping meaningless decimals on whole token thresholds (e.g.
1,5Knot1.000/5.000K).21b9af4.mentioned in commit
21b9af4b87Verified fixed on
2a09e75. Number formatting consistent across Fee Discount Tiers page — K abbreviation for large numbers, consistent decimal places, no scientific notation. Table matches cards.