feat: home screen hardware wallet ui#999
Draft
ovitrif wants to merge 45 commits into
Draft
Conversation
490121b to
a4dbd43
Compare
Collaborator
Author
|
@greptile review |
This comment has been minimized.
This comment has been minimized.
1d82489 to
b301a77
Compare
0717842 to
0e6d5d7
Compare
Collaborator
Author
Added Resolved in 4b0482e |
ovitrif
commented
Jun 16, 2026
ovitrif
left a comment
Collaborator
Author
There was a problem hiding this comment.
Added a couple self-review remarks.
Comment on lines
+3069
to
+3085
| /** | ||
| * The device asks for its one-time pairing code mid-connect, which can happen on | ||
| * any screen via silent reconnects, so the sheet is shown app-wide. High-priority | ||
| * sheets are not interrupted: reconnect retries re-raise the request shortly after. | ||
| */ | ||
| private fun showPairingCodeSheet() { | ||
| val current = _currentSheet.value | ||
| val isHighPrioritySheetShowing = current is Sheet.Gift || | ||
| current is Sheet.Send || | ||
| current is Sheet.BTCPayConnection || | ||
| current is Sheet.LnurlAuth || | ||
| current is Sheet.Pin || | ||
| current is Sheet.PubkyAuth | ||
| if (!isHighPrioritySheetShowing) { | ||
| showSheet(Sheet.Hardware(route = HardwareRoute.PairingCode)) | ||
| } | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
We probably need to queue the pairing sheet so the user doesn't lose the UI response for that action.
| @@ -0,0 +1 @@ | |||
| Show paired Trezor hardware wallet balances and activity on the wallet home screen, with safer USB reconnection, pairing-code entry, and a received sheet for new incoming transactions. | |||
Collaborator
Author
There was a problem hiding this comment.
Compact into:
Show paired Trezor hardware wallet balances and activity on the home screen, with sheets to enter pairing code and notify incoming hardware wallet transactions.
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.
Part of #998
This PR brings the first slice of the Trezor hardware wallet epic to the wallet home screen. A paired Trezor now shows up as a watch-only balance: a device row under the Savings/Spending tiles, its sats folded into the headline total, and its on-chain transactions merged into the recent activity list. A new Hardware suggestion card prompts users with no paired device to start connecting.
Description
libusbhost) when a USB-connected device responded after a read timeout: timed-out asyncUsbRequests were closed while their URB was still queued in the kernel, which then wrote into freed memory once data arrived. USB reads/writes now use synchronousbulkTransfer, eliminating the request-lifetime race.The initial history sync after a watcher starts is treated as a baseline, so only transactions arriving while watching trigger the sheet.
Identifies by xpubs, ensures balance and activity isn't duped. The default tile name is the vendor-prefixed model (e.g. "Trezor Safe 7") unless a custom on-device label is set.
Preview
trezorBle2x.mp4
trezorUsb2x.mp4
receive2x.mp4
Edge Cases & State Variants
trezorViaBle.Usb2x.mp4
trezorActivity2x.mp4
QA Notes
Manual Tests
regression:open Receive and other large sheets: sheet top sits below the home toolbar, toolbar fully visible.Automated Checks
HwWalletRepoTest.kt.BalanceStateTest.kt.WalletRepoTest.ktandDeriveBalanceStateUseCaseTest.kt.ActivityDetailViewModelTest.kt.HwWalletRepoTest.kt.HwWalletRepoTest.kt.TrezorRepoTest.kt.TrezorRepoTest.kt. Also cover scan retries until the device advertises again and stale-session reset before scanning. The usb-attach intent chain is covered acrossTrezorRepoTest.kt,HwWalletRepoTest.kt, andAppViewModelSendFlowTest.kt.TrezorRepoTest.kt.AppViewModelSendFlowTest.ktandHwWalletRepoTest.kt.ActivityListViewModelTest.kt..agents/journeys/for the deterministic bitkit-docker Trezor Bridge emulator: connect + home tile, blue activity icons and filters, injected usb-attach auto-reconnect, and the suggestion card + intro sheet (see the folder README for scope and limits).just compile,just test(full suite),just lint.