Skip to content

Show what a PENDING swap is waiting on - #179

Merged
anderdc merged 2 commits into
testfrom
feat/pending-swap-visibility
Aug 22, 2026
Merged

Show what a PENDING swap is waiting on#179
anderdc merged 2 commits into
testfrom
feat/pending-swap-visibility

Conversation

@anderdc

@anderdc anderdc commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Why

A claimed BTC→SOL swap sat on an almost-empty transaction page for the whole source-confirmation window: no status line for PENDING, and a timeline whose first row read Initiated — because initiated_at only lands once the deposit is final (20–45 min on BTC). That is exactly the phase where the user most wants reassurance.

The page already had what it needed — the SwapClaimed event block time, the deposit hash, the live reservation — it just didn't use any of it. No DB change; the das side landed yesterday in #119 (blockSecs / confirmations on /chains).

What

  • PENDING helper line: names the source chain, the confirmation depth validators wait for, and the typical wall-clock (e.g. 2 confirmations, ~20m typical), and explains the miner's timeout clock hasn't started yet. Also a line for EXPIRED (claim reaped before quorum).
  • Timeline opens with Deposit claimed (from the SwapClaimed block time); Initiated becomes a live waiting row — awaiting 2 Bitcoin confirmations · ~52m elapsed — instead of a hardcoded done step.
  • Explorer links on the Sends / Receives tx hashes (icon beside the existing copy affordance), so the user can watch confirmations accrue on mempool.space etc.
  • Reservation backfill for claim-stage rows that are still empty (pair, amounts, miner, proven from-wallet), via the same useReservationLookup the tracker rows use.
  • EXPIRED now counts as terminal in isTerminal (no more ticking counters on a dead row); ChainInfo gains blockSecs / confirmations; chain seed refreshed (which also pulls in solusdc, hence the llms.txt delta).

Verified

Rendered against test-api: PENDING #112 (btc→sol, sitting at 52m on a slow testnet4 block) and COMPLETED #111 (tao→sol). tsc -b and eslint clean.

anderdc and others added 2 commits August 22, 2026 15:54
A claimed swap sat on a blank page for the whole source-chain
confirmation window — no status line, and a timeline whose first row
was 'Initiated —' because initiated_at only lands once the deposit is
final (20–45 min on BTC). The page already had everything it needed:
the SwapClaimed event's block time, the deposit hash, and the live
reservation behind the row.

- Status helper for PENDING (and EXPIRED): names the source chain, the
  confirmation depth validators wait for, and the typical wall-clock,
  from the blockSecs/confirmations das now serves on /chains.
- Timeline opens with 'Deposit claimed' (SwapClaimed block time) and
  'Initiated' is a live waiting row — what it awaits plus elapsed time —
  instead of a hardcoded done step.
- Sends/Receives tx hashes link to their chain explorer next to the
  copy affordance, so the user can watch confirmations accrue.
- Pair, amounts, miner and proven wallet backfill from the live
  reservation (same lookup the tracker rows use) when the claim-stage
  row is still empty.
- EXPIRED counts as terminal; chain seed refreshed for the new fields.
@anderdc
anderdc merged commit deccac8 into test Aug 22, 2026
@anderdc
anderdc deleted the feat/pending-swap-visibility branch August 22, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant