W11-C3: Trade submission hangs silently with no timeout or error when offline #173
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#173
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?
Issue Summary
When the network is offline and the trader attempts to place or cancel a trade, clicking the submit button triggers the wallet interaction sequence but the request hangs indefinitely. No spinner-with-timeout, no "request cancelled" message, and no error state is shown. The trader cannot tell whether the transaction was submitted, is pending, or was dropped.
Reproduction Steps
/trade, select a pair, fill in a valid price and amountExpected Behavior
After a configurable timeout (e.g. 30 seconds), the submission should cancel and surface an actionable error: "Could not broadcast the transaction. Check your connection and try again." The submit button should re-enable so the trader can retry.
Actual Behavior
The submission hangs indefinitely. No timeout fires, no error is shown, and the submit button state does not recover. The trader has no signal about what happened to their order.
Screen Record
Environment Details
localterra(local Docker), DevTools Offline mode + indexer domain blockedVITE_NETWORK=local npm run devWallet / Device Details
Severity / Impact
P2 UX. A silent hang after a trade submit is one of the worst outcomes for trader trust — they cannot tell if funds moved. On mainnet with real assets this creates genuine risk: a trader may attempt to cancel an order they believe is stuck, not knowing whether it was broadcast. Found under W11-C3 (Contract query failures — Updates and Trader use dimensions).
cc: @PlasticDigits i
mentioned in issue #116
mentioned in commit
3b1a22362dFix landed on
main(c86553f)Trade and other on-chain submits were hanging forever when the wallet RPC / LCD poll stalled (e.g. DevTools Offline after approving a limit place). The shared Terra tx layer now caps
broadcastTxandpollTxso React Query mutations fail and re-enable submit buttons.What changed
executeTerraContract/executeTerraContractMultiwrapwallet.broadcastTx(default 30s,VITE_TERRA_TX_BROADCAST_TIMEOUT_MS) andwallet.pollTx(default 90s,VITE_TERRA_TX_POLL_TIMEOUT_MS) viawithPromiseTimeout./trade.Docs / agent playbooks
skills/AGENTS_FRONTEND_TX_BROADCAST_TIMEOUT.mdskills/AGENTS_FRONTEND_USER_ERRORS.mdanddocs/limit-orders.mdVerification checklist
cd frontend-dapp && npm run test -- --run src/services/terraclassic/__tests__/transactions.test.ts src/utils/__tests__/withPromiseTimeout.test.tsVITE_NETWORK=local npm run dev, Simulated Wallet,/trade→ valid limit → DevTools Offline → Place limit → approve if prompted/limitsplace + cancel an open order while offlineTxResultAlertwith hash@totdking — please verify on your M1 Chrome repro (offline after wallet approve). Leaving open until QA sign-off.
/cc @PlasticDigits
verified on QA stack — fix
c86553fis in main history at HEAD5ed7429.source: both
wallet.broadcastTxandwallet.pollTxnow wrapped withwithPromiseTimeoutin the sharedbroadcastTerraExecuteContractspath (terraBroadcast.ts). covers every on-chain submit: swaps, limit place/cancel, pool add/withdraw, two-step CW20 allowance flows.caps: broadcast 30s, poll 90s, both configurable via
VITE_TERRA_TX_BROADCAST_TIMEOUT_MS/VITE_TERRA_TX_POLL_TIMEOUT_MS. timeout errors pass throughhandleBroadcastErrorunchanged and surface retail copy ("Could not broadcast the transaction. Check your connection and try again." / "Transaction confirmation timed out. Check your connection and try again.").tests:
withPromiseTimeout.test.ts2/2 PASS +transactions.test.ts45/45 PASS = 47/47. fake-timer tests confirm never-settlingbroadcastTxrejects at 30s and never-settlingpollTxrejects at 90s with expected messages — covers the original silent-hang behavior totdking captured.good to close on your side @PlasticDigits
mentioned in issue #305
mentioned in merge request !778
mentioned in merge request !827
mentioned in issue #567
mentioned in merge request !1091
PlasticDigits referenced this issue2026-09-27 12:17:16 +00:00