Skip to content

wallet: Let callers name the chain and wallet - #215

Draft
BenWestgate wants to merge 1 commit into
reviewability-v1from
claude/core-explicit-choices
Draft

BenWestgate wants to merge 1 commit into
reviewability-v1from
claude/core-explicit-choices

Conversation

@BenWestgate

Copy link
Copy Markdown
Owner

Before: BitcoinCore.connect and initialize picked a network and a wallet only by prompting in text. The GUI already asks the operator on screen, so wallet_setup.py answered those prompts by parsing them (_Answer, Offer, about 50 lines).

After: a caller can pass the choice. connect(chain=...) uses that network, or says it is no longer running. When several networks answer and nothing can prompt, it raises ChainChoice with .chains, keeping the old message. initialize(wallet=...) uses that wallet without prompting, and refuses one that is no longer empty. The CLI is unchanged.

How: +21/−3 in _bitcoin_core.py, plus two tests. The GUI can drop its prompt parsing once gui-reviewability-v1 picks up reviewability-v1. This is part of holding the GUI at 2,000 lines.

Validation: 914 tests pass normally and 914 under python -O. Ruff and mypy pass.


Generated by Claude Code

BitcoinCore.connect and initialize choose a network and a wallet by
prompting in text. A frontend that already asked the operator had to
answer those prompts by parsing them. Take the choice directly:
connect(chain=...) uses that network or says it is gone, and raises
ChainChoice listing the networks when several answer and nothing can
prompt. initialize(wallet=...) uses that wallet without prompting and
refuses one that is no longer empty.

Claude-Session: https://claude.ai/code/session_018HrKoywz6PT9c91jvKou7Q

This branch has not been deployed

No deployments
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