Skip to content

fix: update hw activity explorer#1061

Open
piotr-iohk wants to merge 3 commits into
masterfrom
fix/hw-activity-explorer
Open

fix: update hw activity explorer#1061
piotr-iohk wants to merge 3 commits into
masterfrom
fix/hw-activity-explorer

Conversation

@piotr-iohk

@piotr-iohk piotr-iohk commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes the hardware wallet activity explorer so it matches the hardware activity detail state.

The explorer now passes the hardware-wallet activity flag through to the shared activity icon, keeping hardware receive/send icons blue. It also stops showing an indefinite loading spinner when transaction inputs/outputs are unavailable, so hardware wallet activity exploration can still show the transaction id and block explorer action without implying details are still loading.

The loading spinner is kept for regular on-chain activities while tx details load, but hidden for hardware wallet activities and for transfers. Transfers are excluded so hardware wallet transfers do not show an indefinite spinner when inputs/outputs are unavailable; savings-to-spending transfers still load details normally, just without the spinner.

Preview

Before After
Screenshot 2026-07-03 at 15 46 23 Screenshot 2026-07-03 at 15 38 59
Screenshot 2026-07-03 at 16 13 00 Screenshot 2026-07-03 at 16 24 38

QA Notes

Manual Tests

  • 1. Hardware wallet received Bitcoin activity → Activity Detail → Explore: icon is blue and the transaction id is shown without an indefinite spinner.
  • 2. Hardware wallet received Bitcoin activity → Activity Detail → Explore → Open Block Explorer: external block explorer opens for the txid.
  • 3. Hardware wallet → Spending transfer → Activity Detail → Explore: transaction id is shown without an indefinite spinner when inputs/outputs are unavailable.
  • 4. regression: Normal on-chain activity → Activity Detail → Explore: transaction id, inputs/outputs when available, loading spinner while details load, and Open Block Explorer still work.

Automated Checks

  • Local verification: just compile passed.

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown

Greptile Summary

This PR threads an isHardware flag from the view-model UI state through ActivityExploreContent and OnchainDetails to fix two issues in the hardware-wallet activity explorer: incorrect icon color and an indefinite loading spinner when transaction inputs/outputs are unavailable.

  • Icon fix: ActivityIcon now receives isHardware = isHardware, keeping hardware receive/send icons blue in the explore screen, matching the detail screen behavior.
  • Spinner fix: The CircularProgressIndicator is now guarded by !isHardware && !onchain.v1.isTransfer, so it only appears for regular on-chain transactions while details load — hardware wallet activities and transfers skip the spinner since txDetails may remain null indefinitely for those cases.

Confidence Score: 5/5

Safe to merge — the change is narrowly scoped to threading an existing flag through two composables and conditionalizing the loading spinner.

All three changed call sites are correct and the spinner condition faithfully captures intended behavior. No edge cases found.

No files require special attention.

Important Files Changed

Filename Overview
app/src/main/java/to/bitkit/ui/screens/wallets/activity/ActivityExploreScreen.kt Threads isHardware flag to ActivityIcon (fixes blue icon) and OnchainDetails (guards spinner behind !isHardware && !isTransfer); logic is correct and all cases are handled cleanly.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ActivityExploreScreen] -->|reads uiState.isHardwareActivity| B[ActivityExploreContent]
    B -->|isHardware| C[ActivityIcon\nicon color: blue if isHardware]
    B -->|isHardware| D[OnchainDetails]
    D --> E{txDetails != null?}
    E -->|Yes| F[Show inputs & outputs]
    E -->|No| G{isHardware OR isTransfer?}
    G -->|Yes| H[Show nothing\nno spinner]
    G -->|No| I[Show CircularProgressIndicator\nwaiting for details]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[ActivityExploreScreen] -->|reads uiState.isHardwareActivity| B[ActivityExploreContent]
    B -->|isHardware| C[ActivityIcon\nicon color: blue if isHardware]
    B -->|isHardware| D[OnchainDetails]
    D --> E{txDetails != null?}
    E -->|Yes| F[Show inputs & outputs]
    E -->|No| G{isHardware OR isTransfer?}
    G -->|Yes| H[Show nothing\nno spinner]
    G -->|No| I[Show CircularProgressIndicator\nwaiting for details]
Loading

Reviews (2): Last reviewed commit: "fix: skip explore spinner for hw transfe..." | Re-trigger Greptile

@piotr-iohk piotr-iohk self-assigned this Jul 3, 2026
@piotr-iohk piotr-iohk added this to the 2.4.0 milestone Jul 3, 2026
@piotr-iohk piotr-iohk marked this pull request as draft July 3, 2026 14:13
Hide the tx-details loading indicator for hardware wallet and
transfer activities where inputs/outputs never load, while keeping
it for regular on-chain transactions.

Co-authored-by: Cursor <cursoragent@cursor.com>
@piotr-iohk piotr-iohk marked this pull request as ready for review July 3, 2026 14:34
@piotr-iohk piotr-iohk requested a review from jvsena42 July 3, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant