feat: scaffold transaction presentation in bdk_demo#76
Draft
j-kon wants to merge 8 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
BlockchainServiceis wired in.The feature is intentionally decoupled from live blockchain data. The
TransactionsRepositoryinterface 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 withnetAmount,shortTxid, andstatusLabelcomputed propertiesTransactionsRepository— interface +DemoTransactionsRepositoryimplementation backed by static placeholder dataTransactionsController/TransactionsState— RiverpodNotifierwithidle → loading → success/errorstates and human-readable status messagestransactionDetailsProvider—FutureProvider.familyfor per-txid detail lookupTransactionsListPage— scrollable list with amount, direction, date, and confirmation status per rowTransactionDetailPage— full detail view, re-fetches when txid changes viaref.watchShared
WalletUiHelperswidget extracted tofeatures/shared/widgets/and reused across wallet and transaction pagesRouting
transactionsListandtransactionDetailroutes added toapp_router.dartcontext.pushNamedwithtxidpath parameterTests
transactions_list_page_test.dart— idle, loading, success, and error UI statestransaction_detail_page_test.dart— loading, error, not-found, and data states; verifies refresh on txid changerouter_wiring_test.dart— confirms routes are registered and navigableFakeTransactionsRepositoryandplaceholder_transactionsfixtures for isolated widget testsWhat this does not include
Real transaction data is out of scope here.
DemoTransactionsRepositoryreturns hardcoded placeholders. The follow-up work is inBlockchainService(tracked separately), which will implement the actual sync, fetch, and broadcast logic.