Skip to content

feat(frontend): smart wallet input, birth date, UTXO mode and private-key guard - #32

Merged
LORDBABUINO merged 10 commits into
mainfrom
feat/frontend-mainnet-inputs
Sep 6, 2026
Merged

feat(frontend): smart wallet input, birth date, UTXO mode and private-key guard#32
LORDBABUINO merged 10 commits into
mainfrom
feat/frontend-mainnet-inputs

Conversation

@LORDBABUINO

Copy link
Copy Markdown
Collaborator

The input screen collected only a bare descriptor, which is exactly the input real users do not have. This rebuilds the scan entry around what people actually paste, wired to the mainnet capabilities that landed in the last few PRs.

What changed:

  1. A single smart input field classifies what was pasted as it is typed: descriptor, extended public key, address, or a UTXO list (one txid:vout per line), with a badge showing the recognized kind and the parsed UTXO count. Unrecognized input blocks submission.
  2. Pasting anything that looks like an extended private key (bare or embedded inside a descriptor) is flagged in red with an explicit warning and the scan is blocked. The backend has its own guard since feat: accept bare extended public keys as scan input #31; the UI now stops the key from ever leaving the page.
  3. An optional wallet birth date is sent as rescan_since, padded back one day so timezone boundaries cannot hide a wallet's first transactions. A visible note explains that chain scans without it can take much longer on nodes without a block filter index.
  4. The loading screen states what is actually happening for chain scans, tolerates missing props instead of throwing, and the app is wrapped in an error boundary with a back-to-input reset. This hardening came from a real crash observed during a hot-reload session.
  5. buildScanRequest produces the exact API body per kind (utxos array, addr() wrapping for addresses, verbatim descriptor or xpub) and refuses unsendable kinds.

Testing: vitest was added to the frontend (yarn test) with 80 tests across the classifier (37 cases), request builder, and jsdom component tests for the input screen, loading screen and error boundary; every change was written test-first, and the classifier and guard suites include the negative cases (base58 lookalikes, keys buried mid-string). yarn build is clean. Note for CI: the pipeline currently runs only the Rust suites; adding a frontend job is queued in the roadmap.

Validated end to end against a live mainnet node through this UI: address, xpub and UTXO-list scans, including the real LND account zpub audit and the 1.4-minute filtered rescan benchmark.

@LORDBABUINO
LORDBABUINO merged commit 39f11db into main Sep 6, 2026
3 checks passed
@LORDBABUINO
LORDBABUINO deleted the feat/frontend-mainnet-inputs branch September 6, 2026 09:22
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