Fix tsc -b build break on main: SwapAdvancedSettings bookLegMaxResult type #951
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!951
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/337-swap-advanced-build-fix"
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 current main (
8c56f4b8). Two TS2322s, both from one wrong prop type.SwapAdvancedSettings declares
bookLegMaxResult: { spendableRaw: string; human: string }, but the value passed in isComputeMaxSpendableHumanAmountResult, wherespendableRawis abigint(plus cappedByGas/reserveUluna). So it broke two ways:bookLegMaxResult.spendableRaw(string) intoAmountBalanceActions'spendableRaw, which is bigintFix: import the canonical
ComputeMaxSpendableHumanAmountResultand use it for the prop. Type-only, no runtime change.Verified locally:
VITE_WC_PROJECT_IDguard satisfied)CI still doesn't run tsc -b, so this slipped through the same way the earlier build breaks did. Wiring tsc -b into the new functional CI jobs (#421) would catch this class.
mentioned in issue #337
Security review — MR !951
Commit reviewed:
3889651750be9e73aad53d2a93d81db7c368ce65Scope:
frontend-dapp/src/components/swap/SwapAdvancedSettings.tsx— prop type alignment forbookLegMaxResult(ComputeMaxSpendableHumanAmountResultimport + Props field update). Single-file, type-only diff; no runtime logic changes.Prior security threads: None on this MR (only system cross-reference to #337).
Analysis
bookLegMaxResultis computed locally viacomputeMaxSpendableHumanAmount(balance +payAmountRawcap);humanflows only into controlled amount inputs validated byisDecimalAmountDraft.spendableRaw: string) to match runtime (bigint) already consumed byAmountBalanceActions.spendableRaw. No boundary change.TypeScript types are erased at compile time; aligning
bookLegMaxResultwith the canonicalComputeMaxSpendableHumanAmountResultdoes not alter swap submission, signing, or on-chain message construction.Outcome:
FINDINGS: 0medium+Inline threads: None (no actionable security issues on this diff).
Security review: no medium+ findings on this diff.
mentioned in commit
e64670af94