Description
After a user signs and submits a payment transaction, the app shows no indication of how many block confirmations have been received, leaving them unsure whether the transaction is still pending or already finalized. A live confirmation block counter should display progress toward finality.
Technical Context
src/hooks/useTransactionConfirmations.ts (new) polls src/app/api/tx/[hash]/route.ts (new), which queries Horizon /transactions/<hash> and returns the ledger sequence and the current ledger sequence from /ledgers?order=desc&limit=1 to compute confirmations. A src/components/invoice/ConfirmationCounter.tsx renders a circular progress indicator (SVG arc) that fills as confirmations increase toward a FINALITY_THRESHOLD constant (e.g., 3). Polling stops when the threshold is reached.
Acceptance Criteria
Description
After a user signs and submits a payment transaction, the app shows no indication of how many block confirmations have been received, leaving them unsure whether the transaction is still pending or already finalized. A live confirmation block counter should display progress toward finality.
Technical Context
src/hooks/useTransactionConfirmations.ts(new) pollssrc/app/api/tx/[hash]/route.ts(new), which queries Horizon/transactions/<hash>and returns the ledger sequence and the current ledger sequence from/ledgers?order=desc&limit=1to compute confirmations. Asrc/components/invoice/ConfirmationCounter.tsxrenders a circular progress indicator (SVG arc) that fills as confirmations increase toward aFINALITY_THRESHOLDconstant (e.g., 3). Polling stops when the threshold is reached.Acceptance Criteria