Fix tsc -b build break from #360: widen slippage-floor param to string | null #868
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!868
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/360-build-tsc-minreceived-null"
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?
npm run build(tsc -b) is RED on main at16e0656after the #360 merge (!866).buildSubmitAlignedSimPayloadtypes its injectedapplySlippageFloorparam as(returnAmount, slippagePct) => string, but:useSubmitAlignedSimQuoteisapplySlippagePercentFloor, which returnsstring | nullminReceivedfield it feeds is alreadystring | null, and every consumer (SwapPage, TradeMarketOrderPanel) already null-checks itSo the param type was just too narrow. Widening it to
=> string | nullclears the error with no behavior change.npm run buildgreen after the fixlocalhostvs127.0.0.1env artifact, unrelated)Same CI gap as before: pipeline runs vitest + eslint but not
tsc -b, so type breaks land on main unseen.Security review
Commit reviewed:
4e17fcdf776e180046eff4d2f3248d7aa55f00bbScope:
frontend-dapp/src/utils/quoteDebounce.ts— widenbuildSubmitAlignedSimPayloadinjectedapplySlippageFloorcallback return type fromstringtostring | null(1-line diff).Outcome:
FINDINGS: 0medium+Analysis
This MR is a compile-time type alignment only. The output type
SubmitAlignedSimPayload.minReceivedwas alreadystring | null;useSubmitAlignedSimQuote(#360) wiresapplySlippagePercentFloor, which returnsstring | null. Widening the callback param type matches the real function and existing consumers — no runtime logic, validation, or on-chain arg construction changes.Traced attacker-controlled inputs through the slippage path:
applySlippagePercentFloor→applyBpsFloor→tryParseBigInt; returnsnullonly for non-uintreturn_amountstrings.simData.return_amountoriginates from indexer/chain simulation, not direct user text input.submitMinReceived ?? undefinedandmaxSpreadindependently; null-handling predates this diff (#360) and is unchanged here.No injection, authz, XSS, secret leakage, SSRF, or deserialization surface in this diff. No new dependencies.
Inline threads: none (no findings to anchor).
Security review: no medium+ findings on this diff.
mentioned in issue #360
mentioned in commit
8408689ee5mentioned in issue #337
mentioned in issue #370