Skip to content

Commit dc4bf7b

Browse files
claudeBenWestgate
authored andcommitted
cli: Word the case error for every profile
The mixed-case message said either case "recovers the same wallet", but `_parse` shows it for every profile, including shares and application prefixes with no wallet. Say that both cases decode to the same data. Claude-Session: https://claude.ai/code/session_015CuLXqAvAovfoVcUmmogwa
1 parent 83cadeb commit dc4bf7b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/codex32/_cli_input.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ def allowed(candidate: CorrectionCandidate) -> bool:
689689

690690

691691
_FRIENDLY_SET_ERRORS: dict[type[Exception], str] = {
692-
InvalidCase: "A codex32 string is all uppercase or all lowercase; either case recovers the same wallet.",
692+
InvalidCase: "A codex32 string is all uppercase or all lowercase; both cases decode to the same data.",
693693
InvalidChecksum: "The checksum does not match.",
694694
MismatchedProfile: "These strings are for different applications.",
695695
MismatchedThreshold: "These strings require different numbers of shares.",

‎tests/test_cli.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def answer(prompt: str) -> str:
377377
assert prompts == ["Enter a codex32 string:\n> "] * 2
378378
assert rejected not in captured.out
379379
assert (
380-
"Rejected: A codex32 string is all uppercase or all lowercase; either case recovers the same wallet.\n\n"
380+
"Rejected: A codex32 string is all uppercase or all lowercase; both cases decode to the same data.\n\n"
381381
) in captured.err
382382
assert captured.err.endswith("\n\n")
383383

0 commit comments

Comments
 (0)