feat: connect hardware flow#1033
Conversation
4f59345 to
16e800c
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
0c6fb90 to
cb5f127
Compare
cb5f127 to
ee99421
Compare
This comment has been minimized.
This comment has been minimized.
Handled by returning the flow to Resolved in d35810d |
3b2f3ff to
316bf77
Compare
|
Testing (Samsung S22, Android 16, Trezor Safe 7, fresh install)
Screen_Recording_20260622_111352_Bitkit.Regtest.mp4bitkit_logs_2026-06-22_09-14-36.zip Suggested fix: only USB rescan before connect for /dev/... ids (USB attach); enable BLE enumerate during connect for BLE device ids. |
Fixed by limiting the USB pre-connect rescan to Android USB attach route ids ( Resolved in 7ca386e Also investigating why I didn't encounter this bug during testings, given that I also connected first with USB then tested BLE in same session, while USB connection was known. |
Closes #1027
Refs #998
This PR adds Bitkit's Connect Hardware flow for pairing a Trezor as a watch-only hardware wallet from the Home hardware suggestion, Hardware Wallets settings, or Android's USB "Open with Bitkit" chooser.
Description
Figma Designs:
Preview
Connect via Android OS chooser when USB is attached & using BLE via settings screen:
hwconnect.mp4
hwconnect2x.mp4
Connect via suggestion card:
hwviacard.mp4
QA Notes
Figma does not include a dedicated pairing-code screen, so that step follows Bitkit's existing in-sheet patterns.
Manual Tests
regression:Back gesture or Cancel from Intro / Searching / Found / Paired: dismisses the sheet instead of stepping backward through completed connect screens.regression:Disconnect/reconnect USB or toggle Bluetooth for a known device: the hardware connection indicator turns grey when unavailable and green again after silent reconnect.Automated Checks
HwConnectViewModelTest.kt: cover Intro→Searching discovery with and without Bluetooth, Found-route USB refresh before connect, Connect→Paired, inline pairing-code navigation, balance updates, label capping, and Finish persistence.HwWalletRepoTest.kt: cover scan/connect delegation, Label Funds persistence/clearing across transport entries, and wallet-name resolution.TrezorRepoTest.kt,TrezorTransportTest.kt, andAppViewModelSendFlowTest.kt: cover setup gating before scan/connect paths, quiet USB opens, BLE-scan opt-out, USB attach handling, and app-wide pairing-code routing.connect-flow.xml,suggestion-intro-sheet.xml, andusb-reconnect.xmlcover the Settings Add flow, Home suggestion flow, and USB attach reconnect path.just compile,just test,just lint, andgit diff --check.