Clear 3 tsc -b errors from the #359 merge — clean npm run build is red on main #870
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!870
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/359-tsc-signing-types"
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?
A clean
npm run build(fresh.tsbuildinfo, i.e. what CI / a fresh checkout gets) fails on main at8408689with 3 type-only errors. The #359 merge (cd17813, !867) addedterraTxHash.tsandterraWalletSignTxRaw.ts, which carry them; an incremental build with a warm cache masks all three, which is why it slipped past the merge and my own earlier build check.typescript@5.9.3and@types/node@22.19.15are both lockfile-pinned, so this is exactly what CI hits — not a local float.The errors (all type-only, runtime is correct):
terraTxHash.ts:6—txRaw.toBinary()returnsUint8Array<ArrayBufferLike>;crypto.subtle.digestwantsBufferSourceunder the TS 5.9 lib. Assertedas BufferSource.terraWalletSignTxRaw.ts:109— the devMnemonicWalletsetsid'mnemonic', which is outside the cosmesWalletNameenum, sow.id === 'mnemonic'was a no-overlap comparison. Comparedas string(preserves the check).terraWalletSignTxRaw.ts:116—ConnectedWallet.sequenceis private, blockingwallet as { sequence?: bigint }. Routed throughas unknown as.No behavior change. Clean
npm run buildgreen after; full vitest 594/596 (the 2 fails are the known terraExplorer127.0.0.1-vs-localhostenv artifact, unrelated).This is the 4th tsc-only break to land on main because the pipeline runs vitest + eslint but not
tsc -b. Worth adding atsc -b(ornpm run build) step that runs without a warm incremental cache, since incremental masks exactly this class.mentioned in issue #337
Security review
Commit reviewed:
317ad1c670c4c187ff3b09f11bdd207ccfb10e1aScope: 2 files —
frontend-dapp/src/utils/terraTxHash.ts,frontend-dapp/src/services/terraclassic/terraWalletSignTxRaw.ts(TypeScript compile fixes for #359 signing/hash code; no runtime logic changes).Outcome:
FINDINGS: 0medium+Summary: Reviewed the full MR diff and traced each change through callers (
signTerraTxRaw→terraBroadcast.tssplit-sign/recovery path). All three edits are erased-at-compile-time type assertions:bytes as BufferSource—txRaw.toBinary()already yields aUint8Arrayvalid forcrypto.subtle.digest; cast satisfies TS 5.9 lib only.(w.id as string) === 'mnemonic'— preserves the existing dev-wallet branch detection; wallet objects originate from cosmes connection, not attacker-controlled strings.wallet as unknown as { sequence?: bigint }— same sequence-bump behavior as pre-MR direct cast;signedSequenceis sourced fromgetAuthInfo/ signing, not user input.No new injection surfaces, authn/authz changes, secret exposure, unsafe deserialization, or signing/fee-guard bypass. Prior security-review threads: none on this MR.
Inline threads: none (no findings).
mentioned in issue #368
mentioned in issue #370
mentioned in commit
080d0af46a