Repository navigation
Remove duplicated user messages #156
Copy link
Copy link
Open
Labels
cliCommand-line interface behavior.Command-line interface behavior.
Description
Several user-facing messages repeat another message, or sit behind a check an earlier check already makes. Each copy is code to review and keep in sync.
Clear duplicates (first PR):
create: "Only Bitcoin master-seed backups can be created."_creation_headeronly returnsms, and rejects other prefixes with "The set header must begin with ms1."create: "Use --existing when supplying a seed or secret." This can't be reached, becausecreatealready requires an interactive terminal.create:HeaderCollisionappends "; choose another set header" to the library's "new share set must use a different set header".- Wallet commands: "Wallet commands accept only Bitcoin master-seed secrets."
_parsealready rejects anything that isn'tms, and anmssecret is always aMasterSeed. - Bitcoin Core wallet choice: the "Use blank wallet …? [y/N]" prompt and its y/yes check are spelled out three times.
Needs a decision:
_FRIENDLY_SET_ERRORSrewords library errors for interactive entry, while piped input shows the library text for the same mistake. Dropping it would surface terse internal text such as "ms and bip39_12w cannot be combined" and "invalid Long codex32 checksum". The single-copy fix is to move the friendly wording into the library. That changes recovery-code messages, so it needs a security review. Two entries are wrong:MismatchedThresholdsays "different numbers of shares" for a threshold-0 secret entered intoshare, andSecretInRecoverySetcan't be reached.
Share generation (needs a security review):
generation._identifierrepeatsHeader's identifier checks.generation._seed_inputrepeatsMasterSeed.from_seed's length check.
Recovery code (needs a security review):
bip93"interpolation did not produce a secret" appears twice, and the second check is covered by thebasis_secret_typecheck after it.
Smaller repeats (about 1–2 lines each):
- "No unique correction found…" in
create --existingvsNO_CORRECTION. - "Enter one of the displayed numbers.", "That wallet is no longer eligible. Choose again." and "Waiting; press Ctrl-C to stop." are each written twice in
_bitcoin_core.py.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cliCommand-line interface behavior.Command-line interface behavior.
Activity
cli: Remove duplicated messages
BenWestgate commentedon Oct 22, 2026
The friendly-error wording decision is implemented in draft PR #158 (stacked on #157):
_FRIENDLY_SET_ERRORSis removed, the messages now originate in the library, and threshold-0 recovery has an accurate distinct diagnostic. The scoped security diff review found no actionable issues; all 10 CI jobs pass (909 tests on Ubuntu/Python 3.12). This covers the friendly-set-errors portion of the issue; other duplicate-message candidates remain open.