bitcoindevkit / bitcoindevkit/bdk-dart

bug: Android back button closes demo app after wallet creation

Open
#122 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
13
Forks
20
Avg merge
24m
Merged PRs (30d)
3

Description

## Summary

On `bdk_demo` after generating a wallet, tapping the Android system back button closes the app, but the arrow icon at the top left of the screen works correctly (goes back to the previous screen)

Expected UX: The Android system back button should behave like the arrow icon at the top of the screen

## Current behavior
Generate a new wallet, click the Android system back button after, the app closes

Relevant code today:

- `bdk_demo/lib/features/home/home_page.dart` — Active wallet home
- `bdk_demo/lib/features/wallet_setup/wallet_choice_page.dart` — Root bdk_demo page

## Expected behavior

1. **Primary Home balance** reflects confirmed / trusted-spendable funds (so it stays `0` while the only UTXO is untrusted pending).
2. **Pending transaction display** below the Send/Receive row when `trustedPending` / `untrustedPending` (or pending txs) are non-zero — e.g. "+2000 sat pending" with link into Transaction History/detail.
3. After confirmation + sync, pending section clears and primary balance updates.

## Why this matters

Purely UX purposes

## Suggested approach (non-binding)

- Replace the `context.go(AppRoutes.home);` in the `create_wallet_page.dart` with `context.push(AppRoutes.home);`

## Acceptance criteria

- [ ] The Android system back button after creating a new wallet should take the users to the previous screen

Contributor guide

Open the contributing guide

Research direction

Start in bdk_demo/lib/features/wallet_setup/create_wallet_page.dart and compare its navigation with bdk_demo/lib/features/home/home_page.dart and bdk_demo/lib/features/wallet_setup/wallet_choice_page.dart. Reproduce wallet creation on Android, then verify that the system back button returns to the previous screen rather than closing the app; clarify whether the unrelated pending-balance requirements are also in scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.