fix(frontend): widen cancel-mutation prop types to LimitOrderCancelInput (#246) #737
No reviewers
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!737
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/fix-cancel-mutation-prop-type"
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?
Fixes a main build breakage found while verifying #268.
tsc -b/npm run buildhas been red on main since #246 (c93bb3c): the cancel mutation becameLimitOrderCancelInput = number | number[](for batch "Cancel all mine"), but thecancelLimitOrderMutation/cancelMutationprop types onOrderBookPanelandTradeOrderTicketstayedUseMutationResult<…, number, …>. So anumber[]-capable mutation is passed throughnumber-only props — 6 TS2322/TS2345 errors across OrderBookPanel, TradeOrderTicket, TradePage, LimitOrdersPage (e.g.number[]not assignable tonumber).Not caught because the local/CI checks run vitest + eslint, neither of which type-checks; only
tsc -bdoes.Change
Widen the prop types to
LimitOrderCancelInput(the actual hook input type) inOrderBookPanel.tsx(the panel prop + the twoBookSideColumncancelMutationprops) andTradeOrderTicket.tsx(both prop decls). Type-only — no runtime change.Verification
npx tsc -b— exits clean (was 6 errors).npx vitest run OrderBookPanel TradeOrderTicket LimitOrdersPage pair.test— 30 passed.Relates to #246 (origin) and unblocks #268's
typecheck cleancriterion. Not a close. Suggest addingtsc -b/npm run buildto CI so type-only breaks are caught.mentioned in issue #268
mentioned in issue #246
mentioned in commit
90fca1be04