feat(btc-only): bitcoin-only firmware detection + onboarding picker (flag OFF)#347
Merged
Merged
Conversation
…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.
This was referenced Jul 12, 2026
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.
This was referenced Jul 12, 2026
Collaborator
Author
|
Backed out of |
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.
Lands the vault-side bitcoin-only plumbing on develop.
BITCOIN_ONLY_ONBOARDINGdefaults 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 22firmware_variant→ hdwalletFeatures.AsObject.firmwareVariant(messages_pb.d.ts:197) →engine.getDeviceState().firmwareVariant→Dashboard.visibleChains. Unit testflags.test.ts(7/7).Behind
BITCOIN_ONLY_ONBOARDING(OFF)startFirmwareUpdate(bitcoinOnly)installschannel.firmwareBitcoinOnly(throws cleanly if absent).Known gaps (none affect flag-off safety)
firmwareBitcoinOnlyis not populated (no published signed asset) → in-app Bitcoin-only install is inert until one ships. External flashing → boot → BTC-only UI works today.ONDEVICE_FIRMWARE_HASHES→ bootloader-mode reads 'custom/unsigned'; post-boot detection unaffected.coinMode.*i18n is English-only (defaultValue fallback).Test
flags.test.ts7/7 (detection + restriction predicate)