tui: F7 wallet setup — RPC endpoint and chain source on screen
`wallet::NOT_CONFIGURED_MSG` has always said "open F7 to set it up" and there
was no F7. This is that screen.
- `FunctionKey::Setup` on `F7`, live on Main, the settings menu and peer
payments, same invariant `F9` follows.
- `Screen::WalletSetupConfig` carries `WalletSetupConfigState`: a snapshot of
plain data taken when the screen opens, never a handle onto `Node`.
- Rows: the wallet RPC endpoint and its login (never rendered back — the row
says `hidden · set`, `Debug` redacts it), the view-only toggle, and a chain
picker over all four `ChainSource` cases with their own fields.
- `Node::set_remote_daemon` / `set_local_monerod` / `set_receive_only`, so the
TUI can reach what only the Android API could, plus `F6`'s in-process source.
- An untouched chain row is not written, so an F7 save cannot silently undo the
in-process choice; picking a remote daemon says who is trusted in the same
frame, one line, lowercase.
- `Ctrl-T` tests the endpoint and shows the sanitized `PingResult::line()`.
Saving never dials. A rejected form writes nothing — the node validates.
- Docs that claimed there is no F7 (`docs/TUI.md`, `docs/WALLET.md`) now
describe the screen; the settings menu's `endpoint` row names the key.
(cherry picked from commit a48d40bc4e)
This commit is contained in:
parent
9f3745cd1d
commit
a37712f3af
4 changed files with 1335 additions and 22 deletions
|
|
@ -207,10 +207,15 @@ Boot precedence: **stored config → env → disabled**. Stored config that cann
|
|||
be used (non-loopback, `.onion`, missing login) is reported and falls back to
|
||||
env rather than dialling the bad endpoint.
|
||||
|
||||
`Store::save_wallet_config` / `Node::wallet_save_config` exist. **No TUI screen
|
||||
writes them.** There is no `F7`. The not-configured refusal still says
|
||||
`Store::save_wallet_config` / `Node::wallet_save_config` exist, and the `F7`
|
||||
screen (`WalletSetupConfig`) writes them: the endpoint, its login, and the chain
|
||||
source. Nothing else does — `F6` and `F9` show state, the env vars are the
|
||||
headless path. The not-configured refusal says
|
||||
`wallet not configured — open F7 to set it up, or set ONIONWIRE_WALLET_RPC`
|
||||
(`src/wallet.rs`). Live surfaces: `F6`, `F9`, or the env vars.
|
||||
(`src/wallet.rs`), and that key is real.
|
||||
|
||||
A save validated by `Node::wallet_save_config` (loopback host, login required)
|
||||
re-points the wallet without a restart; a rejected form writes nothing.
|
||||
|
||||
`/pay` and `/tip` run `wallet_readiness` before send:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue