Skip to content

chore(deps): bump bitbox_flutter v0.0.5 → v0.0.7#469

Merged
TaprootFreak merged 1 commit into
developfrom
chore/bump-bitbox-flutter-v0.0.7
May 20, 2026
Merged

chore(deps): bump bitbox_flutter v0.0.5 → v0.0.7#469
TaprootFreak merged 1 commit into
developfrom
chore/bump-bitbox-flutter-v0.0.7

Conversation

@TaprootFreak
Copy link
Copy Markdown
Contributor

Summary

Pure dependency bump of bitbox_flutter from v0.0.5 to v0.0.7.

v0.0.7 adds the public installSimulatedBitboxPlatform testing helper
(lib/testing.dart) and ships matching plugin tests. The
BitboxUsbPlatform abstract interface is API-compatible with v0.0.5 —
the diff is only formatting changes to method signatures; no breaking
changes for in-tree callers.

Why now

Unblocks a follow-up PR that replaces the current ad-hoc mocktail
BitBox mocks with the plugin's official simulator, enabling proper
service-lifecycle and observer-timer coverage.

Verification

  • flutter pub get resolves to v0.0.7 (pubspec.lock updated).
  • flutter analyze on lib/packages/hardware_wallet/,
    lib/screens/hardware_connect_bitbox/, and matching test dirs —
    clean.
  • Existing BitBox-related test suites all pass:
    flutter test test/packages/hardware_wallet/ \ test/screens/hardware_connect_bitbox/ \ test/packages/service/wallet_service_test.dart

Out of scope

  • No new tests; no new app code. Tests come in the follow-up PR.

Test plan

  • flutter pub get succeeds
  • flutter analyze clean on BitBox-touching files
  • Existing BitBox tests green locally
  • CI green (will run once PR is marked ready)

v0.0.7 introduces the public `installSimulatedBitboxPlatform` testing
helper (lib/testing.dart) and ships matching plugin tests. The platform
interface is API-compatible with v0.0.5 — only formatting changes on the
abstract method signatures; no breaking changes for callers.

This bump unblocks a follow-up PR that adds a BitboxService lifecycle
suite driven by the official simulator instead of ad-hoc mocktail mocks.
@github-actions
Copy link
Copy Markdown
Contributor

BitBox02 simulator check

Host: linux/amd64 — Started: 2026-05-20T14:38:31Z — Duration: 658ms

Firmware: bitbox02-multi-v9.26.1-simulator1.0.0-linux-amd64

Scenario Result Duration Detail
pair_and_device_info 40ms
restore_simulator_mnemonic 18ms
root_fingerprint_deterministic 0ms
eth_address_mainnet 42ms
eth_address_polygon_multibyte_v 41ms
eth_sign_message_ascii 50ms
eth_sign_message_boundary_1024 43ms
eth_sign_legacy_polygon_multibyte_v 42ms
eth_sign_eip1559_mainnet 42ms
eth_sign_typed_data_kyc_multipage 44ms
eth_sign_typed_data_non_ascii_rejected 1ms
btc_xpub_zpub_mainnet 41ms
btc_address_p2wpkh_mainnet 42ms
btc_address_p2tr_taproot 41ms
btc_sign_message_mainnet 43ms

Summary: 15 total · 15 passed · 0 failed

@TaprootFreak TaprootFreak marked this pull request as ready for review May 20, 2026 14:46
@TaprootFreak TaprootFreak merged commit 8a538a0 into develop May 20, 2026
2 checks passed
@TaprootFreak TaprootFreak deleted the chore/bump-bitbox-flutter-v0.0.7 branch May 20, 2026 14:46
TaprootFreak added a commit that referenced this pull request May 20, 2026
#470)

## Summary

Adds an eight-test `BitboxService` lifecycle suite that locks in the
device-loss / re-attach semantics introduced by #461 and drives the same
code paths the real plugin runs at runtime via the official
`installSimulatedBitboxPlatform` helper.

**Stacks on top of #469** (`chore(deps): bump bitbox_flutter v0.0.5 →
v0.0.7`) — that bump is what exposes the simulator helper. Once #469
merges, this branch can be rebased onto `develop` cleanly.

## What's tested

| Test | Closes drift on |
|---|---|
| `getCredentials before init returns disconnected credentials` | base
behaviour contract |
| `init() promotes credentials handed out before connect (P461 #1)` |
pre-fix the wallet stayed disconnected forever after re-pair |
| `observer clears credentials and closes transport when device
vanishes` | Android USB FD release |
| `observer preserves the credentials reference so reconnect can heal
them` | the core P461 #1 fix — verified end-to-end with a vanish →
reappear cycle |
| `observer stops ticking after a single device-loss event` |
self-cancel after recovery |
| `observer swallows transport-close errors instead of crashing` |
Android plugin can throw on close() if FD is gone |
| `stopConnectionStatusObserver cancels the active periodic` |
start/stop hygiene |
| `startConnectionStatusObserver replaces any prior periodic` | no
double-tick race on re-arm |

## Why the simulator (not mocktail)

The bug class is in a `Timer.periodic` callback that calls into
`BitboxManager.devices` and `BitboxManager.disconnect()`. Mocking
`BitboxService` itself loses the bug; mocking `BitboxManager` adds drift
risk every time the plugin grows. `installSimulatedBitboxPlatform` is
the plugin author's official testing seam — it stubs
`BitboxUsbPlatform.instance` so the real `BitboxManager` runs against an
in-process fake. Adding new scenarios (delays, errors, custom device
lists) is a one-liner via `platform.throwOn(...)` /
`platform.when(...)`.

## Tiny production-code change

`BitboxService` gains an optional ctor parameter:

```dart
BitboxService({Duration connectionStatusInterval = const Duration(seconds: 5)})
```

Default is unchanged (5 s) so `lib/setup/di.dart` keeps the no-arg
constructor it has today. Tests use 50 ms so the periodic can be
exercised in real time without `fakeAsync` gymnastics.

## Verification

- `flutter analyze lib/packages/hardware_wallet/
test/packages/hardware_wallet/` — clean
- `flutter test test/packages/hardware_wallet/bitbox_service_test.dart`
— 8/8 green
- `flutter test test/packages/hardware_wallet/
test/screens/hardware_connect_bitbox/` — all green except one
**pre-existing** failure on `develop` (`BitboxCredentials queue
continues after a sign throws`) that's unrelated to this PR

## Test plan
- [x] `flutter analyze` clean on touched files
- [x] New suite green locally (8/8)
- [x] Full BitBox test dirs green except the known pre-existing failure
- [ ] CI green once #469 is merged + this PR rebased / marked ready
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