feat: connect hardware flow#1033
Open
ovitrif wants to merge 38 commits into
Open
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.
Collaborator
Author
Handled by returning the flow to Resolved in d35810d |
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.
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.