fix: send source & fee progress ui/ux - #1195
Open
ovitrif wants to merge 13 commits into
Open
Conversation
ovitrif
marked this pull request as ready for review
August 28, 2026 21:40
Greptile SummaryThe PR refines send-flow loading presentation and consolidates on-chain fee data into a single UI state while making fee selection return to confirmation immediately.
Confidence Score: 4/5The hardware send path should not be merged until failed fee estimates stop turning swipe-to-confirm into a silent no-op. The refactor filters unsuccessful hardware fee estimates to null, while the confirmation path treats null as an unconditional return without navigation, retry, or user-visible error. Files Needing Attention: app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt | Consolidates send fee state and adjusts asynchronous source/speed refreshes, but failed hardware estimates can now silently block confirmation. |
| app/src/main/java/to/bitkit/ui/screens/wallets/send/SendConfirmScreen.kt | Reworks source and fee loading presentation around the unified fee state. |
| app/src/main/java/to/bitkit/ui/components/NumberPadActionButton.kt | Replaces the Material button wrapper with a stable custom row that preserves its label and track while loading. |
| app/src/main/java/to/bitkit/ui/components/SwipeToConfirm.kt | Moves disabled alpha to inner content so the gradient track remains fully visible. |
| app/src/main/java/to/bitkit/ui/screens/wallets/send/SendFeeViewModel.kt | Reads selected rate and estimates from the new unified on-chain fee state. |
| app/src/test/java/to/bitkit/viewmodels/AppViewModelSendFlowTest.kt | Adds coverage for source loading, retained fee display, immediate navigation, and UTXO reset behavior. |
Sequence Diagram
sequenceDiagram
participant User
participant FeeSheet
participant AppVM as AppViewModel
participant Wallet as Fee estimator
participant Confirm
User->>FeeSheet: Select transaction speed
FeeSheet->>AppVM: setTransactionSpeed(speed)
AppVM->>AppVM: Set speed and loading state
AppVM-->>Confirm: Pop back immediately
AppVM->>Wallet: Refresh max spendable and fee estimates
Wallet-->>AppVM: Updated estimates
AppVM->>AppVM: Replace OnchainFeeUi
AppVM-->>Confirm: Render selected fee
Reviews (1): Last reviewed commit: "test: cover amount continue and speed re..." | Re-trigger Greptile
ben-kaufman
reviewed
Aug 28, 2026
ben-kaufman
reviewed
Aug 28, 2026
ben-kaufman
reviewed
Aug 28, 2026
ben-kaufman
reviewed
Aug 28, 2026
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.
Description
This PR polishes the Trezor send UI from #1187, where switching to hardware left a rough loading chip: the track vanished, the label disappeared behind a spinner, and a Material ripple flashed while the device warmed up.
This PR:
Preview
hwwSendUiFix.mp4
QA Notes
Manual Tests
regression:after Trezor is selected and loading ends: swipe-to-confirm keeps its gradient track and can still be swiped.regression:Savings Send Confirm → Speed: Fast, Normal, and Slow still show estimates like master, and the current rate stays selected.regression:Savings Send Confirm → Speed → pick Fast, Normal, or Slow: returns to Confirm and the fee/speed row updates.regression:Savings Send Confirm → Speed → Custom → set a valid rate → Continue: Confirm shows the custom fee.regression:Savings Send Fee Custom → rate below min or above max: toast blocks continue, same as master.regression:Savings Send Confirm → Speed → back without changing: Confirm fee and speed stay the same.regression:unified Send Confirm → Speed → Instant: still switches to Spending like master.Automated Checks
AppViewModelSendFlowTest.kt: cover hardware-only source loading, keeping a valid amount while Savings refreshes, retaining the previous on-chain fee while estimates refresh, returning from Speed before hardware max finishes, resetting selected UTXOs from the previous rate, and confirming that a missing hardware fee does not block navigation to signing.SendAmountContentTest.kt: use the funding-source loading flag to disable source and continue, and ignore source-chip taps while Amount Continue is loading.SendFeeViewModelTest.kt: fee-sheet init still disables unaffordable rates and validates custom min/max against the unified on-chain fee estimates.