Uh oh!
There was an error while loading. Please reload this page.
fix: send source & fee progress ui/ux - #1195
Conversation
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
piotr-iohk
left a comment
There was a problem hiding this comment.
LGTM
Source chip stays filled with an icon-only spinner on Trezor, no flash switching back to Spending/Savings, swipe keeps its track after load, and Speed pops immediately while the previous fee stays until the new estimate lands.
Uh oh!
There was an error while loading. Please reload this page.
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
Linked Issues/Tasks
Fixes#1203
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.