Skip to content

feat(btc-only): bitcoin-only firmware detection + onboarding picker (flag OFF)#347

Merged
BitHighlander merged 2 commits into
developfrom
spike/bitcoin-only-onboarding
Jul 12, 2026
Merged

feat(btc-only): bitcoin-only firmware detection + onboarding picker (flag OFF)#347
BitHighlander merged 2 commits into
developfrom
spike/bitcoin-only-onboarding

Conversation

@BitHighlander

Copy link
Copy Markdown
Collaborator

Lands the vault-side bitcoin-only plumbing on develop. BITCOIN_ONLY_ONBOARDING defaults OFF — byte-identical to today for multi-chain devices.

What's live regardless of the flag

BTC-only UI restriction. Any device that boots reporting a bitcoin-only variant (KeepKeyBTC/EmulatorBTC) gets its Dashboard restricted to Bitcoin. Verified end-to-end:
fsm_msg_common.h (firmware emits) → proto field 22 firmware_variant → hdwallet Features.AsObject.firmwareVariant (messages_pb.d.ts:197) → engine.getDeviceState().firmwareVariantDashboard.visibleChains. Unit test flags.test.ts (7/7).

Behind BITCOIN_ONLY_ONBOARDING (OFF)

  • OOB (fresh-device-only) inline Multi-coin / Bitcoin-only selector with a one-way seed-lock warning.
  • startFirmwareUpdate(bitcoinOnly) installs channel.firmwareBitcoinOnly (throws cleanly if absent).

Known gaps (none affect flag-off safety)

  1. Manifest firmwareBitcoinOnly is not populated (no published signed asset) → in-app Bitcoin-only install is inert until one ships. External flashing → boot → BTC-only UI works today.
  2. No btc-only entries in ONDEVICE_FIRMWARE_HASHES → bootloader-mode reads 'custom/unsigned'; post-boot detection unaffected.
  3. coinMode.* i18n is English-only (defaultValue fallback).

Test

  • flags.test.ts 7/7 (detection + restriction predicate)
  • External-flash a btc-only build → boot → Dashboard shows only Bitcoin

…flag OFF)

Vault-side plumbing for the bitcoin-only firmware variant. Default OFF and
byte-identical to today for multi-chain devices.

- flags.ts: BITCOIN_ONLY_ONBOARDING (gates OOB picker) + isBitcoinOnlyVariant()
  (detects KeepKeyBTC/EmulatorBTC from device Features firmware_variant).
- Detection is NOT flag-gated: any device reporting a btc-only variant gets the
  Dashboard restricted to Bitcoin. Verified end-to-end fw fsm_msg_common.h ->
  proto field 22 -> hdwallet Features.AsObject.firmwareVariant -> engine ->
  Dashboard.visibleChains. Unit test flags.test.ts (7/7).
- OobSetupWizard: inline Multi-coin / Bitcoin-only selector (fresh-device only)
  with one-way seed-lock warning, behind BITCOIN_ONLY_ONBOARDING.
- engine-controller.startFirmwareUpdate(bitcoinOnly): installs the
  channel.firmwareBitcoinOnly manifest entry; throws cleanly if absent.
- RPC + useFirmwareUpdate thread bitcoinOnly through.

Known gaps (do not block flag-off): manifest firmwareBitcoinOnly is not yet
populated (no published signed asset), so in-app btc-only install is inert
until one ships; ONDEVICE_FIRMWARE_HASHES has no btc-only entries yet.
@BitHighlander BitHighlander merged commit a0b4822 into develop Jul 12, 2026
1 check passed
@BitHighlander BitHighlander deleted the spike/bitcoin-only-onboarding branch July 12, 2026 02:41
BitHighlander added a commit that referenced this pull request Jul 12, 2026
The dashboard chain list already restricts to Bitcoin on btc-only firmware
(#347), but the '+ Add EVM chain' button + AddChainDialog were only gated by
!watchOnly — so a BTConly device could still open the 177-chain EVM picker and
add a network it physically can't touch. Gate the button with !btcOnly (its
sole setShowAddChain trigger), so the dialog can't open.
@BitHighlander

Copy link
Copy Markdown
Collaborator Author

Backed out of develop and consolidated into a single reviewable PR: #353 (branch btc-only). The change itself is unchanged — this was a history cleanup so btc-only ships as one PR. Nothing to do here.

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