-
Notifications
You must be signed in to change notification settings - Fork 1
✨ Add Transaction Status Tracking and History #35
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Description
After submitting transactions, users have no way to track their status or view transaction history within the app.
Current State
- Transactions show "submitted" but no follow-up
- No pending transaction indicator
- No transaction history page
- Users must manually check Stacks Explorer
Proposed Features
1. Pending Transaction Indicator
- Global indicator in header showing pending txs
- Click to see pending transaction details
- Notification when transaction confirms
2. Transaction Status Polling
// hooks/useTransactionStatus.ts
export function useTransactionStatus(txId: string) {
// Poll Stacks API for transaction status
// Return: 'pending' | 'success' | 'failed'
// Include block confirmation count
}3. Transaction History Page
- List all user's transactions with 0xCast contracts
- Filter by type (stake, claim, create, vote)
- Link to Stacks Explorer for each tx
- Show gas fees paid
4. In-App Notifications
// When tx confirms:
toast.success('Your stake of 10 STX on Market #5 confirmed!');UI Mockup
┌─ Header ─────────────────────────────────┐
│ [0xCast] Markets Portfolio 🔔 (2) │
└──────────────────────────────────────────┘
│
▼
┌─ Pending Transactions ───────────────────┐
│ • Stake 10 STX on Market #5 Pending │
│ 0x1234...abcd ⏳ 2 mins │
│ │
│ • Claim winnings Market #3 Confirming │
│ 0x5678...efgh ✓ 1/3 │
└──────────────────────────────────────────┘
Files to Create
frontend/src/hooks/useTransactionStatus.tsfrontend/src/hooks/useTransactionHistory.tsfrontend/src/pages/TransactionsPage.tsxfrontend/src/components/PendingTxIndicator.tsxfrontend/src/components/TransactionToast.tsx
API Endpoints
Use Hiro API for transaction tracking:
GET /extended/v1/tx/{tx_id}GET /extended/v1/address/{address}/transactions
Priority
🟡 Medium - Important UX improvement
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request