feat(frontend): preserve mixed-case tickers on /protocol oracle #1240
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#1240
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
/protocol, product ticker strings in the DEX hub prices card and the CEX oracle card are flattened by Tailwinduppercase. Canonical mixed-case identities (cUSTC,vFDUSD) render asCUSTCandVFDUSD, so the hub wrap mark sits next to a CEXUSTC / USDheading that no longer looks like a different asset, and the vFDUSD tab undoes the #571 / #572 visual distinction from FDUSD.Bundle into one issue: stop
text-transform: uppercaseon ticker-bearing labels (hub<dt>, oracle heading, oracle tabs). Keep uppercase on chrome-only headings (DEX hub prices, table column headers, page H1). Do not merge hub and CEX cards, rename CEXUSTCtocUSTC, or change indexer ticker ids (custc,ustc,vfdusd).Related (closed, shipped the cards — do not reopen): #550 (unified oracle card), #556 / #570 (DEX hub +
cUSTC/LUNCcolumns), #571 / #572 (vFDUSD tab = FDUSD CEX reference + Venus1 vFDUSD Price). Copy length: #489. Token picker casing: #630 (different surface).Current codebase
Hub labels are correct in source, then CSS uppercases them
ProtocolDexHubPrices.tsxprintsHUB_PRICE_TICKER_LABEL[ticker] / USDon a<dt className="text-xs uppercase tracking-wide">.hubPriceTicker.tsalready maps:custccUSTCluncLUNCust1UST1ustrUSTRThe card H2
DEX hub pricesalso usesuppercase— that chrome is fine. WrapAddressRowaria already sayscUSTC token/cLUNC wrap. Disclaimer stays DEX reference — not CEX, not settlement.Oracle tabs and heading use the same
uppercaseclassProtocolOracleCard.tsx(data-testid="protocol-oracle"):{heading}isuppercase. Forustc/luncthat is${label} / USD. Forvfdusd, heading isvFDUSDonly (no/ USD, #571). CSS turns it into VFDUSD.PROTOCOL_ORACLE_TICKER_LABEL(protocolOracleTicker.ts:USTC,LUNC,vFDUSD) withfont-semibold uppercase tracking-wide. vFDUSD → VFDUSD.FDUSD reference pricewhenticker === 'vfdusd', elseReference price. Venus block heading is1 vFDUSD Price(alsouppercase—vFDUSDbecomesVFDUSDthere too).ProtocolPage.tsxpage H1 isProtocol+ lead DEX USD stats, DEX hub marks, and CEX reference prices. Not settlement. Query?ticker=allowlist is unchanged (ustc|lunc|vfdusd).Tests do not catch the flattening
ProtocolPage.test.tsxassertsgetByRole('heading', { name: /^vFDUSD$/i })(case-insensitive) and hub copy/explorer aria (cUSTC,cLUNC) — not the visible<dt>/ tab text. jsdom does not applytext-transform, so CI never seesCUSTC/VFDUSD.Why the new implementation is needed
Retail on
/protocolmust tell cUSTC (wrap hub) from USTC (CEX) and vFDUSD from FDUSD at a glance. Uppercasing mixed-case product tickers collapses those identities. Source maps and #571 copy already have the right strings; the chrome class fights them.Constraints / guardrails
GET /api/v1/oracle/price/{ticker},GET /api/v1/hub-prices, Venus poller, or wrap address resolution.ustr/ust1/custc). Hub vs CEX stay two cards.luncis the CEX LUNC mark with a cLUNC wrap contract row (#570). Oracleluncis the CEX LUNC feed with sources/history.window.location.hrefor leak host:port on 502 (existing outage banner).uppercasemay remain on non-ticker chrome (page H1, DEX hub prices, On-chain contracts, tableSOURCE/USD/TIME, StatBox labels that are not tickers).Relevant files
frontend-dapp/src/components/protocol/ProtocolOracleCard.tsxfrontend-dapp/src/components/protocol/ProtocolDexHubPrices.tsxfrontend-dapp/src/pages/ProtocolPage.test.tsxprotocolOracleTicker.ts,hubPriceTicker.tsRecommended direction
uppercasefrom hub<dt>ticker lines, oracle H2, oracle tab buttons, and the Venus1 vFDUSD Priceheading (or any other node that interpolatescUSTC/cLUNC/vFDUSD). Keeptracking-wide/font-semiboldif useful.namematch (no/ionvFDUSD/cUSTC). Assert hubcUSTC / USDand oracle tabvFDUSD. jsdom will pass; that is still the contract for future CSS.Definition of Ready
Given / When / Then
Given
/protocolwith hub prices and the CEX oracle card renderedWhen a reader looks at hub column labels and oracle tabs (including the vFDUSD tab and Venus heading)
Then visible product tickers match the maps: hub
cUSTC / USD,LUNC / USD,UST1 / USD,USTR / USD; oracle tabsUSTC,LUNC,vFDUSD; vFDUSD H2 isvFDUSD(notvFDUSD / USD); Venus heading retains lowercasevinvFDUSD; CEX USTC heading remainsUSTC / USD(notcUSTC).Given the vFDUSD tab
When the CEX StatBox and Venus block render
Then the CEX print stays labeled FDUSD reference price; Venus stays 1 vFDUSD Price with mixed-case
vFDUSD; disclaimers still deny settlement / TWAP / UST1 window.Acceptance criteria
<dt>showscUSTC / USD(notCUSTC / USD).LUNC/UST1/USTRunchanged besides no extra transform.USTC,LUNC,vFDUSD(notVFDUSD).USTC / USD,LUNC / USD, orvFDUSDper #571 (vFDUSD heading has no/ USD).1 vFDUSD Pricekeeps mixed-casevFDUSD.cUSTC; CEX tab isUSTC; hubLUNCstill has cLUNC wrapAddressRow; oracleLUNCstill loads CEX sources/history.?ticker=allowlist unchanged. No new CEX tickers.Test plan (functional paths)
within(hub).getByText('cUSTC / USD'); must not matchCUSTC / USD. Same for absence ofVFDUSDon oracle tabs.USTC / USD; click / keyboard to vFDUSD → headingvFDUSDwith case-sensitive accessible name; tab textvFDUSD.FDUSD reference price+ Venus1 vFDUSD Pricestill present; CEX query stillvfdusd; Venus query still separate.?ticker=vfdusddeep link; unknown?ticker=still falls back toustc; P550-11 disclaimer; hub wrap copy aria stillcUSTC/cLUNC.Test plan (attack, hack, and abuse)
Not a wallet / auth / keys / wasm / deploy / 2-of-3 surface. Keep existing ticker parser tests:
fdusd,javascript:,../, HTML, andcustcmust not become CEX oracle tickers. No extra DeFi attack suite.Verification criteria
frontend-dappProtocol page unit tests pass, including new exact-case assertions./protocol: hubcUSTC / USDnext to oracleUSTC / USDis readable as wrap vs CEX; vFDUSD tab showsvFDUSDnotVFDUSD.DEX HUB PRICES/PROTOCOL.Out of scope
cUSTC/cLUNC).First-pass model recommendation
Recommendation: composer
Rationale: First pass, low/medium risk, chrome-only class change on two production files in the protocol UI (
ProtocolOracleCard.tsx,ProtocolDexHubPrices.tsx) plus focused assertions inProtocolPage.test.tsx. Ticker maps, indexer, and Venus stay untouched. No shared protocol/state, migration, or founder-required surface (contracts, auth, keys, wasm, deploy, wallet / 2-of-3). Acceptance is deterministic RTL exact-case text. File count alone is not the reason; the edit is a known local CSS vs label-map mismatch with a clear non-goal list.cl8y-agent-control: queued
implementjob93b530a6-3f65-438b-8178-3d1504ae2a41(not executed; no Hetzner VM).Merged onto
origin/mainvia #1241.make verify-issue-1240was 8/8./protocolhub/oracle tickers keep mixed case (cUSTC,vFDUSD). Frontend-only; no wasm leftover.CI: Woodpecker did not post live statuses; merge used local gitleaks + Forgejo status
ci/woodpecker/pr/woodpecker.Woodpecker enablement follow-up: #1247 (frontend already on main; Coolify bake is optional).
Also there is inconsistency with naming on some pages, for instance """DEX hub prices
DEX reference — not CEX, not settlement.
cUSTC / USD
$0.00516100
terra1…56ch
LUNC / USD
$0.0000510433
terra1…sgdg
UST1 / USD
$0.996903
terra1…w55f
USTR / USD
$0.00956560
terra1…hgqy
"""
Should be cLUNC not LUNC
/agent implement
also not naming is inconsistent on /protocol oracle, it says cUSTC/USD and LUNC/USD, it shoudl be USTC/USD and LUNC/USD
Merged as PR #1290. Hub wrap dts are cUSTC / cLUNC; CEX tabs stay USTC / LUNC / vFDUSD.
Leftover: production /protocol glance-check after Coolify. Tracked on #1300.
Post-merge note vs the original issue text: mixed-case already shipped in #1241. PR #1290 rewrote hub wrap from
LUNC / USDtocLUNC / USD(CEX tabs stay native LUNC). That contradicts the original GWT/P1240-5 “do not retitle hub LUNC as cLUNC”; treat the merged leftover as the product choice, not a faithful close of the first AC wording. Production/protocolglance-check still on #1300.