OE-8 UI: no distinct "broadcast → awaiting confirmation" state; "/trade" success alerts say "submitted" on already-confirmed txs #304
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#304
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?
Summary
Two related gaps in the tx lifecycle display:
isPending: truemutation state. The UI shows a static label ("Swapping…", "Submitting…") from when Keplr opens all the way through block inclusion — up to 2 minutes — with no indication the tx hash was received and the app is now waiting for a block./trademarket order and limit order flows show "submitted" on success, but the success alert fires only afterpollTxhas returned andtxResponse.code === 0has been verified. The tx is on-chain and confirmed at that point./swapand/poolcorrectly use confirmed language ("Swap successful!", "Liquidity provided!").Root cause (code verified)
No intermediate state:
terraBroadcast.ts:107–118—broadcastTx(sign + send) andpollTx(wait for block) are sequential awaits inside the sameasync mutationFn. There is no callback or state emission betweenbroadcastTxresolving (tx hash received) andpollTxcompleting (confirmed), so the mutation staysisPending: truethroughout with no hook to update the UI mid-flight.Language inconsistency:
TradeMarketOrderPanel.tsx:569:"Market swap submitted."— fires afterpollTxconfirmscode === 0TradeOrderTicket.tsx:850:"Limit order submitted."— same conditionLimitOrderLadderPanel.tsx:303:"Ladder submitted."— same conditionSwapPage.tsx:1370:"Swap successful!"— correctPoolPage.tsx:713:"Liquidity provided!"— correctSteps to reproduce
Missing broadcast state:
/swap, select a pair, enter an amount and click Swap"Submitted" on confirmed tx:
/trade/:pairAddrExpected behavior
Once
broadcastTxreturns a hash butpollTxis still running, the UI should switch to a distinct label such as "Confirming…" or "Waiting for confirmation…" so the user knows the tx was sent and the app is waiting for block inclusion — not that the app is still waiting for the wallet.Success alerts should use confirmed language ("confirmed", "placed", "successful") on all flows consistently, since the success state is only reached after on-chain confirmation.
Actual behavior
/trademarket and limit flows show "submitted" on success;/swapand/poolshow "successful" / "provided" on the same confirmed condition.Environment
/(Swap),/trade/:pairAddr,/limits,/poolSeverity: P3- Nit -> no functional issue; txs land correctly. The broadcast-state gap affects UX transparency when confirmation is slow; the language inconsistency is a polish gap between pages.
cc: @PlasticDigits
mentioned in issue #291
mentioned in merge request !755
Did the language half — MR !755. The /trade market, /trade limit, /limits, and ladder success alerts said "submitted" even though they fire only after pollTx confirms code==0 (the tx is on-chain by then), while /swap and /pool already say "successful"/"provided". Switched the four to "confirmed"/"placed". Also caught a 4th occurrence your note didn't list — LimitOrdersPage.tsx:597 — fixed that too. tsc -b clean.
The intermediate "broadcast -> confirming" state (part 1) I left out on purpose: terraBroadcast.ts runs broadcastTx then pollTx as sequential awaits in one mutationFn, so there's no hook to flip to a "Confirming..." label mid-flight — that's a broadcast-pattern change worth its own MR. Visual/browser verification is yours. @PlasticDigits
mentioned in commit
c71e3474fbFollowup issue should be created for consistent UX with standardized component for showing user tx states
mentioned in issue #305
marked as related to #305
mentioned in merge request !778
Verification report — issue #304
Issue: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/304
Branch verified:
main@531d00e(includes !755 language fix and #305 broadcast phases)Acceptance criteria
pollTxruns)broadcastTerraExecuteContractsemitssigning→broadcasting→confirming(terraBroadcast.ts);useTerraBroadcastMutation+terraBroadcastPendingButtonLabelwired on Swap, Pool, Limits, Trade market/limit/ladder. Unit:terraBroadcast.test.ts,useTerraBroadcastMutation.test.tsx,terraBroadcastUi.test.ts(11/11). Browser (Simulated Wallet, LocalTerra): swap button showed Confirming… mid-flight; market order showed Broadcasting…;TerraBroadcastPendingLinkvisible during confirming.pollTx+code === 0Market swap confirmed./Limit order placed./Ladder placed.(no* submitted.on those paths). MR !755 merged. Browser: swap alert Swap successful!; market order Market swap confirmed.tsc -b(frontend)npx tsc -binfrontend-dapp(exit 0)Commands / environment
Notes
feat(frontend): Terra broadcast signing → confirming UI phases) onmain; this issue’s scope is satisfied on currentmain.Verifier:
agent:verifyautomation — all criteria PASS. Closing as implemented onmain.