Skip to content

feat: hardware wallet detail screen#611

Draft
jvsena42 wants to merge 3 commits into
feat/home-hw-wallet-uifrom
feat/hw-wallet-activity
Draft

feat: hardware wallet detail screen#611
jvsena42 wants to merge 3 commits into
feat/home-hw-wallet-uifrom
feat/hw-wallet-activity

Conversation

@jvsena42

@jvsena42 jvsena42 commented Jun 29, 2026

Copy link
Copy Markdown
Member

Part of #589

This PR adds a detail screen for paired hardware wallets. Tapping a device's tile on the home screen now opens a Savings/Spending-style overview of that watch-only wallet instead of a "Coming Soon" notice.

Description

  • Adds the Hardware Wallet detail screen: the device name with a blue Bitcoin icon in the top bar, a balance header, the device's on-chain activity grouped by date with blue hardware icons, and a Remove button.
  • Adds a Transfer To Spending button on funded devices; it shows a "not yet implemented" notice for now (the on-device signed transfer flow lands in a later PR).
  • Removing a device shows a confirmation dialog explaining funds stay safe, then stops the device's watchers, deletes its stored activity, and forgets every paired entry for that wallet, so its tile and balance disappear from the home screen.
  • Empty / zero-balance devices show only the balance header and the Remove button.
  • Renders the global Send / Scan / Receive bar on the new route, matching the Savings and Spending screens.

This is the iOS port of synonymdev/bitkit-android#1022. iOS already had the watch-only data layer (per-device deviceIds, removeDevice, walletsLoaded, blue hardware activity icons, and walletId-scoped activity queries), so this PR is mainly the detail screen and its navigation wiring.

Linked Issues/Tasks

Screenshot / Video

with-activities.mov
delete.mov

QA Notes

OBS: Only tested with emulator

Manual Tests

  • 1. Pair a Trezor -> Home -> tap the hardware tile -> Hardware Wallet opens: device name with a blue Bitcoin icon in the top bar, balance header, recent device activity with blue icons.
  • 2. Hardware Wallet (funded) -> tap Transfer To Spending: "Transfer to spending not yet implemented." toast shows.
  • 3. Hardware Wallet -> tap an activity item -> Activity Item opens.
  • 4a. Hardware Wallet -> tap Remove -> confirm dialog (funds-safe copy) -> Cancel: dialog closes, still on Hardware Wallet.
    • 4b. tap Remove -> Remove: returns to Home, the tile is gone, the headline total drops the hardware balance, no error toast.
  • 5. Empty / zero-balance device -> Hardware Wallet: ₿0 balance header, no Transfer button, Remove button shown, Send/Receive bar visible.
  • 6. regression: Home, Savings, Spending, and All Activity -> bottom Send/Scan/Receive bar visible on each.

Automated Checks

  • Build passes: xcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace -scheme Bitkit -configuration Debug -destination 'platform=iOS Simulator,id=<iPhone 16>' ONLY_ACTIVE_ARCH=YES build (concrete simulator UDID + ONLY_ACTIVE_ARCH=YES because the Rust xcframeworks are arm64-only).
  • Tests pass: BitkitTests/HwWalletManagerTests (29 tests) — existing coverage for removeDevice (stops watchers, deletes activities) and forget-via-update. No new tests added because the new code is SwiftUI view orchestration over the already-tested HwWalletManager.removeDevice and TrezorManager.forgetDevice.
  • SwiftFormat: clean on changed files.
  • node scripts/validate-translations.js could not run locally (missing glob dependency / no package.json in this checkout); the added English keys are well-formed.
  • CI: standard build and test checks run by the PR bot.

@jvsena42 jvsena42 self-assigned this Jun 29, 2026
@jvsena42 jvsena42 added this to the 2.4.0 milestone Jun 29, 2026
@jvsena42

Copy link
Copy Markdown
Member Author

Waiting for #605 merge to open this branch for review

@jvsena42 jvsena42 mentioned this pull request Jun 29, 2026
6 tasks
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