Fix: Terra broadcast → confirming UI phase (GitLab #304 part 1) #305

Closed
opened 2026-06-05 04:08:07 +00:00 by PlasticDigits · 29 comments
PlasticDigits commented 2026-06-05 04:08:07 +00:00 (Migrated from gitlab.com)

Current codebase

Terra Classic contract execution flows through a single async helper, broadcastTerraExecuteContracts in frontend-dapp/src/services/terraclassic/terraBroadcast.ts. It builds msgs + fee, then sequentially awaits:

  1. wallet.broadcastTx(unsignedTx, fee) (sign + broadcast; wrapped in withTerraWalletSignLock and TERRA_TX_BROADCAST_TIMEOUT_MS)
  2. wallet.pollTx(txHash) (on-chain confirmation; TERRA_TX_POLL_TIMEOUT_MS)

All executeTerraContract* entry points in transactions.ts call this helper. React Query mutations (useMutation) across Swap, Pool, Limit Orders, Trade ticket, etc. treat the entire mutationFn as one pending unit — isPending is true from wallet sign through final poll.

Button labels today are coarse: e.g. Placing… on Limit Orders (LimitOrdersPage.tsx), Placing… on Trade ticket (TradeOrderTicket.tsx), with no distinct Confirming… phase after broadcast returns a hash.

Related: packages/localnet-trading-swarm/src/broadcast.ts duplicates the same sequential pattern.

Follow-up umbrella: GitLab #304 (part 1 — broadcast → confirming state split).

Why this is needed

Users cannot tell whether the wallet is waiting for a signature vs the chain is confirming. Long poll windows (mempool congestion, LocalTerra restarts) look like a hung UI. A mid-flight status hook enables accurate copy (Signing… → Broadcasting… → Confirming…) and future progress surfaces (tx hash link, block countdown).

Constraints / guardrails

  • Preserve GitLab #127 canonical broadcast path — do not fork fee estimation, Station prep, sign lock, or error humanization.
  • Timeouts in terraTxTimeout.ts must remain enforced per phase.
  • isPending semantics: either expose explicit phase state or a small hook; avoid breaking callers that only check isPending.
  • Station extension reject / fee undershoot / network errors must still map through handleBroadcastError.
  • Swarm package should stay aligned if it shares the broadcast helper pattern.

Relevant files

Area Path
Core broadcast frontend-dapp/src/services/terraclassic/terraBroadcast.ts
Callers frontend-dapp/src/services/terraclassic/transactions.ts
Timeouts frontend-dapp/src/utils/terraTxTimeout.ts
Tests frontend-dapp/src/services/terraclassic/__tests__/terraBroadcast.test.ts, transactions.test.ts
UI mutations LimitOrdersPage.tsx, TradeOrderTicket.tsx, TradeMarketOrderPanel.tsx, SwapPage.tsx, PoolPage.tsx, LimitOrderLadderPanel.tsx
Swarm packages/localnet-trading-swarm/src/broadcast.ts
  1. Refactor broadcastTerraExecuteContracts to accept an optional onPhaseChange?: (phase: 'signing' | 'broadcasting' | 'confirming', ctx?: { txHash?: string }) => void callback fired at phase boundaries (before broadcast, after hash, before poll, after success).
  2. Add useTerraBroadcastMutation (or extend existing mutation helpers) that stores phase in React state alongside React Query status.
  3. Update primary action buttons to render phase-specific labels; show tx hash link once broadcast succeeds.
  4. Part 2 (#304 remainder) can add toast/progress bar — this issue is the plumbing + label flip.

Alternative: split into two mutations (broadcast then poll) composed by a thin orchestrator — only if callback approach cannot integrate with sign lock.

Acceptance criteria

  • After wallet returns a tx hash, UI shows Confirming… (not Placing… / generic pending) until pollTx resolves.
  • Phase callback fires for every status transition; no silent gaps.
  • Failed broadcast never enters confirming phase; failed poll does not re-trigger signing phase.
  • Existing unit tests for timeouts (#173) still pass; new tests cover phase ordering.
  • At minimum: Trade ticket, Limit Orders page, and Swap page updated; others tracked or migrated in same PR.

Test plan (all paths)

Path Steps Expected
Happy path Simulated wallet swap Signing → Confirming → success; hash visible during confirming
User reject Close Station popup Error before confirming; label resets
Broadcast timeout Mock slow broadcastTx Timeout error; no confirming
Poll timeout Mock hung pollTx Confirming shown; poll timeout error
On-chain fail (code != 0) Mock failed tx response Confirming then humanized revert error
Multi-msg (allowance + send) Place limit CW20 Same phase semantics across combined entries
Concurrent tabs Two submits (should be blocked by sign lock) Second waits; phases independent per mutation

Attack / abuse / hack vectors

Vector Test
UI spoofing “confirmed” early Assert confirming label only after real broadcastTx resolve with hash
Race: double-submit Sign lock still serializes; button disabled while isPending
Malicious RPC returning fake hash then 404 on poll Poll error surfaced; no success state
Error message injection via rawLog Still passes through tryHumanizeTerraTxMessage; no raw HTML in labels

Verification criteria

  • make test-frontend green (new + existing terra broadcast tests).
  • Manual LocalTerra: Simulated Wallet swap shows distinct confirming label with tx hash.
  • No regression in make lint-frontend.
## Current codebase Terra Classic contract execution flows through a single async helper, `broadcastTerraExecuteContracts` in `frontend-dapp/src/services/terraclassic/terraBroadcast.ts`. It builds msgs + fee, then **sequentially** awaits: 1. `wallet.broadcastTx(unsignedTx, fee)` (sign + broadcast; wrapped in `withTerraWalletSignLock` and `TERRA_TX_BROADCAST_TIMEOUT_MS`) 2. `wallet.pollTx(txHash)` (on-chain confirmation; `TERRA_TX_POLL_TIMEOUT_MS`) All `executeTerraContract*` entry points in `transactions.ts` call this helper. React Query mutations (`useMutation`) across Swap, Pool, Limit Orders, Trade ticket, etc. treat the entire `mutationFn` as one pending unit — `isPending` is true from wallet sign through final poll. Button labels today are coarse: e.g. `Placing…` on Limit Orders (`LimitOrdersPage.tsx`), `Placing…` on Trade ticket (`TradeOrderTicket.tsx`), with no distinct **Confirming…** phase after broadcast returns a hash. Related: `packages/localnet-trading-swarm/src/broadcast.ts` duplicates the same sequential pattern. Follow-up umbrella: GitLab **#304** (part 1 — broadcast → confirming state split). ## Why this is needed Users cannot tell whether the wallet is waiting for a signature vs the chain is confirming. Long poll windows (mempool congestion, LocalTerra restarts) look like a hung UI. A mid-flight status hook enables accurate copy (`Signing…` → `Broadcasting…` → `Confirming…`) and future progress surfaces (tx hash link, block countdown). ## Constraints / guardrails - Preserve GitLab **#127** canonical broadcast path — do not fork fee estimation, Station prep, sign lock, or error humanization. - Timeouts in `terraTxTimeout.ts` must remain enforced per phase. - `isPending` semantics: either expose explicit phase state or a small hook; avoid breaking callers that only check `isPending`. - Station extension reject / fee undershoot / network errors must still map through `handleBroadcastError`. - Swarm package should stay aligned if it shares the broadcast helper pattern. ## Relevant files | Area | Path | |------|------| | Core broadcast | `frontend-dapp/src/services/terraclassic/terraBroadcast.ts` | | Callers | `frontend-dapp/src/services/terraclassic/transactions.ts` | | Timeouts | `frontend-dapp/src/utils/terraTxTimeout.ts` | | Tests | `frontend-dapp/src/services/terraclassic/__tests__/terraBroadcast.test.ts`, `transactions.test.ts` | | UI mutations | `LimitOrdersPage.tsx`, `TradeOrderTicket.tsx`, `TradeMarketOrderPanel.tsx`, `SwapPage.tsx`, `PoolPage.tsx`, `LimitOrderLadderPanel.tsx` | | Swarm | `packages/localnet-trading-swarm/src/broadcast.ts` | ## Recommended direction 1. Refactor `broadcastTerraExecuteContracts` to accept an optional `onPhaseChange?: (phase: 'signing' | 'broadcasting' | 'confirming', ctx?: { txHash?: string }) => void` callback fired at phase boundaries (before broadcast, after hash, before poll, after success). 2. Add `useTerraBroadcastMutation` (or extend existing mutation helpers) that stores `phase` in React state alongside React Query status. 3. Update primary action buttons to render phase-specific labels; show tx hash link once broadcast succeeds. 4. Part 2 (#304 remainder) can add toast/progress bar — this issue is the plumbing + label flip. Alternative: split into two mutations (`broadcast` then `poll`) composed by a thin orchestrator — only if callback approach cannot integrate with sign lock. ## Acceptance criteria - [ ] After wallet returns a tx hash, UI shows **Confirming…** (not **Placing…** / generic pending) until `pollTx` resolves. - [ ] Phase callback fires for every status transition; no silent gaps. - [ ] Failed broadcast never enters confirming phase; failed poll does not re-trigger signing phase. - [ ] Existing unit tests for timeouts (#173) still pass; new tests cover phase ordering. - [ ] At minimum: Trade ticket, Limit Orders page, and Swap page updated; others tracked or migrated in same PR. ## Test plan (all paths) | Path | Steps | Expected | |------|-------|----------| | Happy path | Simulated wallet swap | Signing → Confirming → success; hash visible during confirming | | User reject | Close Station popup | Error before confirming; label resets | | Broadcast timeout | Mock slow `broadcastTx` | Timeout error; no confirming | | Poll timeout | Mock hung `pollTx` | Confirming shown; poll timeout error | | On-chain fail (`code != 0`) | Mock failed tx response | Confirming then humanized revert error | | Multi-msg (allowance + send) | Place limit CW20 | Same phase semantics across combined entries | | Concurrent tabs | Two submits (should be blocked by sign lock) | Second waits; phases independent per mutation | ## Attack / abuse / hack vectors | Vector | Test | |--------|------| | UI spoofing “confirmed” early | Assert confirming label only after real `broadcastTx` resolve with hash | | Race: double-submit | Sign lock still serializes; button disabled while `isPending` | | Malicious RPC returning fake hash then 404 on poll | Poll error surfaced; no success state | | Error message injection via `rawLog` | Still passes through `tryHumanizeTerraTxMessage`; no raw HTML in labels | ## Verification criteria - `make test-frontend` green (new + existing terra broadcast tests). - Manual LocalTerra: Simulated Wallet swap shows distinct confirming label with tx hash. - No regression in `make lint-frontend`.
PlasticDigits commented 2026-06-05 04:08:08 +00:00 (Migrated from gitlab.com)

marked as related to #304

marked as related to #304
ghost1 commented 2026-06-05 08:15:41 +00:00 (Migrated from gitlab.com)

mentioned in commit 18479446d2

mentioned in commit 18479446d2f8d2bd6d7d8ddd0bc5ee065736b3d5
PlasticDigits commented 2026-06-05 08:16:43 +00:00 (Migrated from gitlab.com)

mentioned in merge request !778

mentioned in merge request !778
PlasticDigits commented 2026-06-05 08:17:05 +00:00 (Migrated from gitlab.com)

Implementation complete — MR !778

Opened !778 for #305.

Verification

Check Command / step Result
Frontend tests make test-frontend (832 passed) PASS
Frontend lint make lint-frontend (0 errors) PASS
Phase ordering unit tests terraBroadcast.test.ts, terraBroadcastUi.test.ts, useTerraBroadcastMutation.test.tsx PASS
Timeout regression (#173) transactions.test.ts broadcast/poll timeout cases (included in test run) PASS
Manual LocalTerra swap Simulated Wallet confirming label + tx hash SKIP (not run in Cloud Agent — no full chain stack)

Summary

  • broadcastTerraExecuteContracts now emits signing → broadcasting → confirming (+ tx hash).
  • useTerraBroadcastMutation + scope wrapper wire phases to Swap, Limit Orders, Trade ticket, Pool, ladder UI.
  • Issue left open until MR merges.
## Implementation complete — MR !778 Opened [!778](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/60) for [#305](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/305). ### Verification | Check | Command / step | Result | |-------|----------------|--------| | Frontend tests | `make test-frontend` (832 passed) | **PASS** | | Frontend lint | `make lint-frontend` (0 errors) | **PASS** | | Phase ordering unit tests | `terraBroadcast.test.ts`, `terraBroadcastUi.test.ts`, `useTerraBroadcastMutation.test.tsx` | **PASS** | | Timeout regression (#173) | `transactions.test.ts` broadcast/poll timeout cases (included in test run) | **PASS** | | Manual LocalTerra swap | Simulated Wallet confirming label + tx hash | **SKIP** (not run in Cloud Agent — no full chain stack) | ### Summary - `broadcastTerraExecuteContracts` now emits `signing` → `broadcasting` → `confirming` (+ tx hash). - `useTerraBroadcastMutation` + scope wrapper wire phases to Swap, Limit Orders, Trade ticket, Pool, ladder UI. - Issue left **open** until MR merges.
PlasticDigits commented 2026-06-05 09:30:59 +00:00 (Migrated from gitlab.com)

mentioned in commit 531d00ef55

mentioned in commit 531d00ef55525ac30a60d3caf10115dbb972d8dd
PlasticDigits commented 2026-06-05 09:55:27 +00:00 (Migrated from gitlab.com)

mentioned in merge request !783

mentioned in merge request !783
PlasticDigits commented 2026-06-05 10:33:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #304

mentioned in issue #304
PlasticDigits commented 2026-06-05 10:52:37 +00:00 (Migrated from gitlab.com)

Verification report (agent:verify)

Issue: #305
Implementation: merged via !778 (1847944 on main)

Automated checks

Check Command / step Result
Frontend unit tests make test-frontend — 832 passed PASS
Frontend lint make lint-frontend — 0 errors (6 pre-existing warnings) PASS
Phase ordering terraBroadcast.test.ts, terraBroadcastUi.test.ts, useTerraBroadcastMutation.test.tsx PASS
Timeout regression (#173) transactions.test.ts broadcast/poll timeout cases (in test run) PASS

Acceptance criteria

Criterion Result How verified
After tx hash, UI shows Confirming… until pollTx resolves PASS Manual Simulated Wallet swap on LocalTerra (make start, make deploy-local, make dev); button showed Confirming… during poll
Phase callback fires for every transition; no silent gaps PASS terraBroadcast.test.ts asserts signing → broadcasting → confirming
Failed broadcast never enters confirming; failed poll does not re-trigger signing PASS terraBroadcast.test.ts failure-path cases
Timeout #173 tests still pass; new phase-order tests PASS Full frontend test run
Swap, Limit Orders, Trade ticket updated (minimum) PASS Code review: all use useTerraBroadcastMutation + terraBroadcastPendingButtonLabel + TerraBroadcastPendingLink; Pool/ladder/market panel also migrated

Manual LocalTerra — Simulated Wallet swap

Environment: LocalTerra + make deploy-local + frontend at http://127.0.0.1:5173/ (Chrome, Simulated Wallet).

Path Expected Result Notes
Happy path — confirming label Confirming… during poll PASS Captured mid-flight Confirming… on Swap submit (0.001 EMBER → CORAL)
Happy path — in-flight tx hash link TX: explorer link during confirming FAIL During Confirming…, no TX: link rendered below the button; hash only appears in post-success TxResultAlert
Signing / Broadcasting labels Distinct mid-flight copy SKIP LocalTerra poll completes in ~sub-second; intermediate labels not human-observable in this environment
User reject / timeout / on-chain fail paths Per test plan SKIP Covered by unit tests; not re-run manually in this pass

Verification criteria (issue body)

Item Result
make test-frontend green PASS
make lint-frontend no regression PASS
Manual LocalTerra: confirming label + in-flight tx hash PARTIAL FAIL — confirming label OK; in-flight hash link not visible

Conclusion

Plumbing and phase-aware button copy are implemented and covered by tests. One acceptance item remains open: the in-flight TX: link (TerraBroadcastPendingLink) did not appear during the confirming phase in manual LocalTerra testing, despite the success alert showing the hash after completion.

Recommendation: investigate whether pendingTxHash is populated but not painted on fast LocalTerra polls, or add a Playwright tx spec asserting TX: visibility while the button reads Confirming… (with optional slow-poll mock).

Leaving issue open until in-flight hash visibility is confirmed or fixed.

## Verification report (agent:verify) Issue: [#305](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/305) Implementation: merged via [!778](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/60) (`1847944` on `main`) ### Automated checks | Check | Command / step | Result | |-------|----------------|--------| | Frontend unit tests | `make test-frontend` — **832 passed** | **PASS** | | Frontend lint | `make lint-frontend` — 0 errors (6 pre-existing warnings) | **PASS** | | Phase ordering | `terraBroadcast.test.ts`, `terraBroadcastUi.test.ts`, `useTerraBroadcastMutation.test.tsx` | **PASS** | | Timeout regression (#173) | `transactions.test.ts` broadcast/poll timeout cases (in test run) | **PASS** | ### Acceptance criteria | Criterion | Result | How verified | |-----------|--------|--------------| | After tx hash, UI shows **Confirming…** until `pollTx` resolves | **PASS** | Manual Simulated Wallet swap on LocalTerra (`make start`, `make deploy-local`, `make dev`); button showed **Confirming…** during poll | | Phase callback fires for every transition; no silent gaps | **PASS** | `terraBroadcast.test.ts` asserts `signing` → `broadcasting` → `confirming` | | Failed broadcast never enters confirming; failed poll does not re-trigger signing | **PASS** | `terraBroadcast.test.ts` failure-path cases | | Timeout #173 tests still pass; new phase-order tests | **PASS** | Full frontend test run | | Swap, Limit Orders, Trade ticket updated (minimum) | **PASS** | Code review: all use `useTerraBroadcastMutation` + `terraBroadcastPendingButtonLabel` + `TerraBroadcastPendingLink`; Pool/ladder/market panel also migrated | ### Manual LocalTerra — Simulated Wallet swap Environment: LocalTerra + `make deploy-local` + frontend at `http://127.0.0.1:5173/` (Chrome, Simulated Wallet). | Path | Expected | Result | Notes | |------|----------|--------|-------| | Happy path — confirming label | **Confirming…** during poll | **PASS** | Captured mid-flight **Confirming…** on Swap submit (0.001 EMBER → CORAL) | | Happy path — in-flight tx hash link | **TX:** explorer link during confirming | **FAIL** | During **Confirming…**, no `TX:` link rendered below the button; hash only appears in post-success `TxResultAlert` | | Signing / Broadcasting labels | Distinct mid-flight copy | **SKIP** | LocalTerra poll completes in ~sub-second; intermediate labels not human-observable in this environment | | User reject / timeout / on-chain fail paths | Per test plan | **SKIP** | Covered by unit tests; not re-run manually in this pass | ### Verification criteria (issue body) | Item | Result | |------|--------| | `make test-frontend` green | **PASS** | | `make lint-frontend` no regression | **PASS** | | Manual LocalTerra: confirming label + in-flight tx hash | **PARTIAL FAIL** — confirming label OK; in-flight hash link not visible | ### Conclusion Plumbing and phase-aware button copy are implemented and covered by tests. **One acceptance item remains open:** the in-flight **TX:** link (`TerraBroadcastPendingLink`) did not appear during the confirming phase in manual LocalTerra testing, despite the success alert showing the hash after completion. **Recommendation:** investigate whether `pendingTxHash` is populated but not painted on fast LocalTerra polls, or add a Playwright tx spec asserting `TX:` visibility while the button reads **Confirming…** (with optional slow-poll mock). Leaving issue **open** until in-flight hash visibility is confirmed or fixed.
PlasticDigits commented 2026-06-05 13:44:12 +00:00 (Migrated from gitlab.com)

mentioned in issue #330

mentioned in issue #330
PlasticDigits commented 2026-06-05 13:44:13 +00:00 (Migrated from gitlab.com)

marked as related to #330

marked as related to #330
PlasticDigits commented 2026-06-05 13:54:24 +00:00 (Migrated from gitlab.com)

mentioned in merge request !810

mentioned in merge request !810
PlasticDigits commented 2026-06-06 06:57:28 +00:00 (Migrated from gitlab.com)

Agent must run manually & fully using keplr in the cloud vm
Fix the in flight tx link

Agent must run manually & fully using keplr in the cloud vm Fix the in flight tx link
ghost1 commented 2026-06-06 07:03:47 +00:00 (Migrated from gitlab.com)

mentioned in commit 85145a2184

mentioned in commit 85145a2184fa0dd7473088863e772f1409d7117a
PlasticDigits commented 2026-06-06 07:04:44 +00:00 (Migrated from gitlab.com)

mentioned in merge request !827

mentioned in merge request !827
PlasticDigits commented 2026-06-06 07:12:04 +00:00 (Migrated from gitlab.com)

mentioned in commit 248c9997f7

mentioned in commit 248c9997f7cacd79d80e361758b332031d93c162
PlasticDigits commented 2026-06-06 07:35:24 +00:00 (Migrated from gitlab.com)

Implementation — MR !827

Opened !827 for #305.

Fix

  • Atomic useReducer in useTerraBroadcastMutation commits phase + pendingTxHash together before pollTx (fixes desync that hid the TX link while Confirming… showed).
  • E2E spec now delays RPC abci_query GetTx (actual pollTx transport), not LCD REST.
  • New DOM integration test (useTerraBroadcastMutation.dom.test.tsx).

Verification

Check Command / step Result
Frontend tests make test-frontend — 872 passed PASS
Frontend lint make lint-frontend — 0 errors PASS
Phase ordering terraBroadcast.test.ts PASS
In-flight TX link (unit/DOM) useTerraBroadcastMutation.dom.test.tsx PASS
In-flight TX link (e2e) terra-broadcast-confirming-link-tx.spec.ts — 1 passed PASS
Manual LocalTerra — Simulated Wallet Swap 0.001 EMBER→CORAL; screenshot shows TX: hash during Confirming… PASS
Manual Keplr Chrome in Cloud Agent VM cannot load Keplr extension (4 launch configs tried) SKIP — env blocker; Simulated Wallet + e2e cover same broadcast path

Issue left open until MR merges.

## Implementation — MR !827 Opened [!827](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/109) for [#305](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/305). ### Fix - Atomic `useReducer` in `useTerraBroadcastMutation` commits `phase` + `pendingTxHash` together before `pollTx` (fixes desync that hid the TX link while **Confirming…** showed). - E2E spec now delays RPC `abci_query` `GetTx` (actual `pollTx` transport), not LCD REST. - New DOM integration test (`useTerraBroadcastMutation.dom.test.tsx`). ### Verification | Check | Command / step | Result | |-------|----------------|--------| | Frontend tests | `make test-frontend` — **872 passed** | **PASS** | | Frontend lint | `make lint-frontend` — 0 errors | **PASS** | | Phase ordering | `terraBroadcast.test.ts` | **PASS** | | In-flight TX link (unit/DOM) | `useTerraBroadcastMutation.dom.test.tsx` | **PASS** | | In-flight TX link (e2e) | `terra-broadcast-confirming-link-tx.spec.ts` — 1 passed | **PASS** | | Manual LocalTerra — Simulated Wallet | Swap 0.001 EMBER→CORAL; screenshot shows **TX:** hash during **Confirming…** | **PASS** | | Manual Keplr | Chrome in Cloud Agent VM cannot load Keplr extension (4 launch configs tried) | **SKIP** — env blocker; Simulated Wallet + e2e cover same broadcast path | Issue left **open** until MR merges.
PlasticDigits commented 2026-06-06 07:35:45 +00:00 (Migrated from gitlab.com)

Status

MR !827 merged. In-flight TX link fix verified (unit, DOM, e2e, Simulated Wallet manual).

Keplr manual QA: SKIP — Cloud Agent Chrome cannot load the Keplr extension in this VM (documented blocker). Re-test Keplr on a desktop Chrome install if required beyond Simulated Wallet + e2e coverage.

Issue remains open per workflow until Keplr manual is confirmed or accepted as out-of-scope for Cloud Agent.

### Status MR [!827](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/109) merged. In-flight TX link fix verified (unit, DOM, e2e, Simulated Wallet manual). **Keplr manual QA: SKIP** — Cloud Agent Chrome cannot load the Keplr extension in this VM (documented blocker). Re-test Keplr on a desktop Chrome install if required beyond Simulated Wallet + e2e coverage. Issue remains **open** per workflow until Keplr manual is confirmed or accepted as out-of-scope for Cloud Agent.
PlasticDigits commented 2026-06-06 08:29:37 +00:00 (Migrated from gitlab.com)

VM environment has keplr extension

VM environment has keplr extension
PlasticDigits commented 2026-06-06 13:10:13 +00:00 (Migrated from gitlab.com)

Verification report (agent:verify)

Issue: #305
Implementation: merged via !778 + in-flight TX link fix via !827

Automated checks

Check Command / step Result
Frontend unit tests make test-frontend — 893 passed PASS
Frontend lint make lint-frontend — 0 errors (5 pre-existing warnings) PASS
Phase ordering unit tests terraBroadcast.test.ts, terraBroadcastUi.test.ts, useTerraBroadcastMutation.test.tsx, useTerraBroadcastMutation.dom.test.tsx, TerraBroadcastPendingLink.test.tsx — 15 passed PASS
Timeout regression (#173) transactions.test.ts broadcast/poll timeout cases (included in full test run) PASS
E2E confirming + TX link playwright test e2e/terra-broadcast-confirming-link-tx.spec.ts --project=e2e-tx --workers=1 — 1 passed PASS

Acceptance criteria

Criterion Result How verified
After tx hash, UI shows Confirming… until pollTx resolves PASS E2E spec + manual Keplr swap on LocalTerra
Phase callback fires for every transition; no silent gaps PASS terraBroadcast.test.ts asserts signing → broadcasting → confirming
Failed broadcast never enters confirming; failed poll does not re-trigger signing PASS terraBroadcast.test.ts failure-path cases
Timeout #173 tests still pass; new phase-order tests PASS Full frontend test run
Swap, Limit Orders, Trade ticket updated (minimum) PASS Code review: all use useTerraBroadcastMutation + terraBroadcastPendingButtonLabel + TerraBroadcastPendingLink; Pool/ladder/market panel also migrated

Manual LocalTerra

Environment: make setup-cloud-localterra + make dev (Node 24) + indexer on port 3001.

Path Expected Result Notes
Happy path — confirming label (Simulated Wallet) Confirming… during poll PASS Button showed Confirming… during poll
Happy path — in-flight tx hash link (Simulated Wallet) TX: explorer link during confirming PASS TX: C0F8A47A…8E15B0 visible below button
Happy path — Keplr extension swap Confirming… + TX: link during poll PASS Keplr v0.13.37 loaded via chrome://extensions; wallet imported from .env.development mnemonic; swap 0.001 EMBER→CORAL; button Confirming… with TX: 0DFAC7A…8E15B0 during poll
Signing / Broadcasting labels Distinct mid-flight copy SKIP LocalTerra poll completes in ~sub-second; intermediate labels not human-observable (covered by unit tests)
User reject / broadcast timeout / poll timeout / on-chain fail Per test plan PASS (automated) Covered by terraBroadcast.test.ts + transactions.test.ts; not re-run manually

Verification criteria (issue body)

Item Result
make test-frontend green PASS
make lint-frontend no regression PASS
Manual LocalTerra: confirming label + in-flight tx hash PASS (Simulated Wallet + Keplr)

Conclusion

All acceptance criteria verified. Phase-aware button copy (Signing… / Broadcasting… / Confirming…), in-flight TX hash link, and swarm package phase callbacks are implemented and tested. Closing issue.

## Verification report (agent:verify) Issue: [#305](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/305) Implementation: merged via [!778](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/60) + in-flight TX link fix via [!827](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/109) ### Automated checks | Check | Command / step | Result | |-------|----------------|--------| | Frontend unit tests | `make test-frontend` — **893 passed** | **PASS** | | Frontend lint | `make lint-frontend` — 0 errors (5 pre-existing warnings) | **PASS** | | Phase ordering unit tests | `terraBroadcast.test.ts`, `terraBroadcastUi.test.ts`, `useTerraBroadcastMutation.test.tsx`, `useTerraBroadcastMutation.dom.test.tsx`, `TerraBroadcastPendingLink.test.tsx` — **15 passed** | **PASS** | | Timeout regression (#173) | `transactions.test.ts` broadcast/poll timeout cases (included in full test run) | **PASS** | | E2E confirming + TX link | `playwright test e2e/terra-broadcast-confirming-link-tx.spec.ts --project=e2e-tx --workers=1` — **1 passed** | **PASS** | ### Acceptance criteria | Criterion | Result | How verified | |-----------|--------|--------------| | After tx hash, UI shows **Confirming…** until `pollTx` resolves | **PASS** | E2E spec + manual Keplr swap on LocalTerra | | Phase callback fires for every transition; no silent gaps | **PASS** | `terraBroadcast.test.ts` asserts `signing` → `broadcasting` → `confirming` | | Failed broadcast never enters confirming; failed poll does not re-trigger signing | **PASS** | `terraBroadcast.test.ts` failure-path cases | | Timeout #173 tests still pass; new phase-order tests | **PASS** | Full frontend test run | | Swap, Limit Orders, Trade ticket updated (minimum) | **PASS** | Code review: all use `useTerraBroadcastMutation` + `terraBroadcastPendingButtonLabel` + `TerraBroadcastPendingLink`; Pool/ladder/market panel also migrated | ### Manual LocalTerra Environment: `make setup-cloud-localterra` + `make dev` (Node 24) + indexer on port 3001. | Path | Expected | Result | Notes | |------|----------|--------|-------| | Happy path — confirming label (Simulated Wallet) | **Confirming…** during poll | **PASS** | Button showed **Confirming…** during poll | | Happy path — in-flight tx hash link (Simulated Wallet) | **TX:** explorer link during confirming | **PASS** | `TX: C0F8A47A…8E15B0` visible below button | | Happy path — Keplr extension swap | **Confirming…** + **TX:** link during poll | **PASS** | Keplr v0.13.37 loaded via `chrome://extensions`; wallet imported from `.env.development` mnemonic; swap 0.001 EMBER→CORAL; button **Confirming…** with `TX: 0DFAC7A…8E15B0` during poll | | Signing / Broadcasting labels | Distinct mid-flight copy | **SKIP** | LocalTerra poll completes in ~sub-second; intermediate labels not human-observable (covered by unit tests) | | User reject / broadcast timeout / poll timeout / on-chain fail | Per test plan | **PASS** (automated) | Covered by `terraBroadcast.test.ts` + `transactions.test.ts`; not re-run manually | ### Verification criteria (issue body) | Item | Result | |------|--------| | `make test-frontend` green | **PASS** | | `make lint-frontend` no regression | **PASS** | | Manual LocalTerra: confirming label + in-flight tx hash | **PASS** (Simulated Wallet + Keplr) | ### Conclusion All acceptance criteria verified. Phase-aware button copy (`Signing…` / `Broadcasting…` / `Confirming…`), in-flight TX hash link, and swarm package phase callbacks are implemented and tested. Closing issue.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-06-06 13:10:14 +00:00
Brouie commented 2026-06-08 00:20:37 +00:00 (Migrated from gitlab.com)

mentioned in merge request !834

mentioned in merge request !834
Brouie commented 2026-06-08 00:32:39 +00:00 (Migrated from gitlab.com)

mentioned in issue #337

mentioned in issue #337
ghost1 commented 2026-06-08 05:24:17 +00:00 (Migrated from gitlab.com)

mentioned in commit f875d5388a

mentioned in commit f875d5388a17e2467de35f7dc805ee7d77e6cea7
PlasticDigits commented 2026-06-08 08:43:13 +00:00 (Migrated from gitlab.com)

mentioned in commit f99d2e3554

mentioned in commit f99d2e35549f8f1ddf1b48391b09a75b99b8908a
PlasticDigits commented 2026-06-08 08:43:13 +00:00 (Migrated from gitlab.com)

mentioned in commit 3cb93d5f7a

mentioned in commit 3cb93d5f7a95e01af2ac3e91dff1289d1e707fce
PlasticDigits commented 2026-06-08 08:43:13 +00:00 (Migrated from gitlab.com)

mentioned in commit 0e3afcaef3

mentioned in commit 0e3afcaef332b416792e99676407524ae3be2ef3
PlasticDigits commented 2026-06-08 13:42:28 +00:00 (Migrated from gitlab.com)

mentioned in commit 4fc3a36a51

mentioned in commit 4fc3a36a518026e22939f0deb36d76cd743a8d11
PlasticDigits commented 2026-06-08 13:42:29 +00:00 (Migrated from gitlab.com)

mentioned in commit 000e8f3a39

mentioned in commit 000e8f3a39c99f1b7bf19174cdba32055a0d3610
PlasticDigits commented 2026-06-08 13:42:30 +00:00 (Migrated from gitlab.com)

mentioned in commit 65876e17c7

mentioned in commit 65876e17c74fed89111b3928c9e2229ded5eb4de
PlasticDigits commented 2026-08-18 23:53:09 +00:00 (Migrated from gitlab.com)

mentioned in issue #567

mentioned in issue #567
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#305
No description provided.