Skip to content

feat: scaffold transaction presentation in bdk_demo#76

Draft
j-kon wants to merge 8 commits into
bitcoindevkit:mainfrom
j-kon:feat/bdk-demo-transaction-scaffold
Draft

feat: scaffold transaction presentation in bdk_demo#76
j-kon wants to merge 8 commits into
bitcoindevkit:mainfrom
j-kon:feat/bdk-demo-transaction-scaffold

Conversation

@j-kon
Copy link
Copy Markdown
Contributor

@j-kon j-kon commented Jun 2, 2026

This PR scaffolds the full transaction presentation layer in bdk_demo — list view, detail view, state management, and routing — using placeholder data until the real BlockchainService is wired in.

The feature is intentionally decoupled from live blockchain data. The TransactionsRepository interface abstracts the data source, so swapping in real BDK transactions later requires no changes to the UI or controller layers.

Changes

New feature: bdk_demo/lib/features/transactions/

  • DemoTxDetails — presentation DTO with netAmount, shortTxid, and statusLabel computed properties
  • TransactionsRepository — interface + DemoTransactionsRepository implementation backed by static placeholder data
  • TransactionsController / TransactionsState — Riverpod Notifier with idle → loading → success/error states and human-readable status messages
  • transactionDetailsProviderFutureProvider.family for per-txid detail lookup
  • TransactionsListPage — scrollable list with amount, direction, date, and confirmation status per row
  • TransactionDetailPage — full detail view, re-fetches when txid changes via ref.watch

Shared

  • WalletUiHelpers widget extracted to features/shared/widgets/ and reused across wallet and transaction pages

Routing

  • transactionsList and transactionDetail routes added to app_router.dart
  • Deep-link navigation via context.pushNamed with txid path parameter

Tests

  • transactions_list_page_test.dart — idle, loading, success, and error UI states
  • transaction_detail_page_test.dart — loading, error, not-found, and data states; verifies refresh on txid change
  • router_wiring_test.dart — confirms routes are registered and navigable
  • FakeTransactionsRepository and placeholder_transactions fixtures for isolated widget tests

What this does not include

Real transaction data is out of scope here. DemoTransactionsRepository returns hardcoded placeholders. The follow-up work is in BlockchainService (tracked separately), which will implement the actual sync, fetch, and broadcast logic.

@j-kon j-kon marked this pull request as draft June 2, 2026 15:41
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