deviant/snapshots/0233-wallet-release-audit-pass-1.md
Local Dev ced2eda48d @
chore: checkpoint in-flight work across domains

Sweep of accumulated uncommitted work on design/dex-p2p-architecture into
one checkpoint (multiple sessions share this tree). Main areas:

- anthemus: covenant-wiring follow-ups (engine, ExchangePanel), AgoraScreen seam
- spv: ServerPool + p2p header transport (pool.ts, core/spv/*), wallet.ts wiring
- walletconnect: responder/useConnect updates + connect-responder-compat test
- wallet: send-tier-a rework + swap.ts, plus send-tier-a unit tests
- asm: chipnet throughput/stress harness (scripts/chipnet-asm-*) + ASM_Native docs
- app UI: screens/* and shell.css touch-ups; sat -> bits copy migration
- docs: new snapshots (INDEX regenerated), Parameters (WalletConnect/SSH/ASM),
  KnowledgeBase, WALLET-COORDINATION changelog

Checkpoint only; not a release. Secrets (Keys/, .chipnet-keys*, .env) remain
gitignored and were verified absent from the staged set.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@
2026-08-14 02:00:43 +02:00

12 KiB
Raw Blame History

domain summary tags
wallet Wallet release audit pass 1 — drove shells/app end-to-end on chipnet Wallet C in the browser preview, walked every top-level tab (Main / Agora / Artemision / Apps / Settings) plus sub-tabs (Assets|Wallets, Anthemus Swap|Exchange|Deposit, Create|Katalogos, Discover|Connected, dev-wallet picker). One functional bug FIXED live: chipnet dev-wallet mode surfaced 'account is locked; unlock() first' as a red banner on the Apps tab — WZ init hit KeyStore.exportXpub while the vault-less dev session was locked. Same silent-skip pattern as §7.4 WIF-restored, missed for the 'locked' code (my snapshot 0232 fix). Fix in useConnect.ts:220-231, verified: banner gone, honest console.info fires in its place. Rest of the audit is a punch list of terminology (systematic 'sat'→'bits' violations across Main hero, Wallets rows, Backed-Assets drill-down, Settings token definitions, Agora My Assets), IA (Settings gear only on MAIN, 'WALLETS: No wallets yet' misleading in dev-mode, MAIN tab lacks a glyph while others have ⬡/△/⧉), and polish (undecoded PNV acronym, missing BCH suffix on hero category strip). No fake data surfaced — every 'demo' surface (Anthemus book, Deposit catalog) already carries an honest label. See snapshot body for the full findings list + suggested fix locations. wallet, audit, release, ui, terminology, bits, connectors, chipnet, apps, settings, main, agora, artemision

Snapshot 0233 — wallet release audit, pass 1

Date: 2026-07-29 Track: Wallet release polish — feature-by-feature audit Method: live-drive shells/app via preview (app-shell launch config, port 51353), chipnet Wallet C, walk every screen the tab bar exposes + sub-tabs + one drill-down.


What got fixed live in the pass

§Apps — dev-wallet 'account is locked' banner. shells/app/src/connect/useConnect.ts:220-231

The §7.4 fix in snapshot 0232 silent-skipped KeyStoreError.code === 'not-supported' (WIF-restored wallets with no HD tree). It missed code === 'locked', which fires when the KeyStore has HD path metadata (so supportedPathNames() passes the gate) but has never been unlocked. That is exactly what happens in chipnet dev-wallet mode — the dev-wallet path builds a session directly from a bundled .chipnet-keys-*.json and bypasses the vault entirely. buildXpubCache then hits exportXpub → KeyStoreError('account is locked; unlock() first', 'locked') → red banner on the Apps tab.

Fix: silent-skip 'locked' too, with an honest console.info explaining that WZ is unavailable in dev-wallet mode. WC and CC remain available. Verified in-browser after reload: banner gone, console line fires, Apps tab renders clean.


Punch list — findings by screen

Bootflow · Onboarding / Unlock

  • [ok] Onboarding intro renders and unmounts cleanly on wallet pick. (Earlier false-alarm about a leftover overlay was a browser-tool caching artefact.)
  • [ok] Chipnet dev-wallet picker loads 7 wallets from bundled .chipnet-keys-*.json — invaluable for iteration.

Main tab · MainScreen

  • [bug — terminology] Wallet hero card reads 27,270,748 sat / 0.2727 BCH. Project rule (bit ≠ sat): user-facing unit is bit / bits. Should read 27,270,748 bits. screens/MainScreen.tsx — hero renderer.
  • [bug — terminology] Category expansion rows: "Bitcoin Cash" row shows 27,010,748 sat. Same rule.
  • [polish] Category strip 0.2727 | 7 WALLETS | Bitcoin Cash 0.270 | MBA·backed 0.003 | NBA·non-backed ~0.000 — the three per-category numbers have no unit label; "BCH" is only inferrable from the wallet card below. Add a small BCH suffix or a shared caption.
  • [polish] Total shown twice — top strip 0.2727 and wallet card 0.2727 BCH. Give one of them a distinct role (e.g. strip = per-category only, card = total).
  • [polish] MAIN tab in the tab bar has NO glyph — all others show ⬡ AGORA · ⇅ (FAB) · △ ARTEMISION · ⧉ APPS. Add a MAIN glyph for consistency (⌂ or ◐ are conventional homes).
  • [verify] 7 WALLETS chip — need to confirm it's a link to Settings→Wallets vs a passive counter.

Main tab · Wallets sub-tab

  • [bug — terminology] Every wallet row shows sat. 88,016,852 sat, etc. Same rule.
  • [polish] 345 tok utxos — the abbreviation tok utxos reads as dev jargon; spell out token UTXOs or drop the metric from the summary line and expose it in an expandable per-wallet details view.
  • [polish] "Wallets | Activity" scope sub-sub-tab inside the "Wallets" filter tab reads awkward — three levels of "wallets/activity". Consider promoting Activity to its own affordance.
  • [ok] ✎ rename affordance present on every row (0227).
  • [ok] Σ 1.9157 BCH aggregate is clear.

Main tab · category drill-down (Backed Assets expanded)

  • [bug — terminology] 1 CAP = 100 sat, 1 ASM2 = 1,000 sat — backing-rate lines. Same rule. This is a user-facing peg statement.
  • [polish] "PNV" appears as a badge on each MBA row but is nowhere defined in the UI. Tooltip or a small footnote linking to a glossary would help. (Same abbreviation appears in Agora My Assets.)
  • [ok] VIEW IN AGORA → link is a nice affordance.
  • [ok] "Protocol-enforced BCH floor · redeemable" is honest and accurate framing.

Agora tab · My Assets

  • [bug — terminology] PNV 200,000 sat / PNV 60,000 sat per-asset lines. Same rule.
  • [polish] Two-letter avatars (CA, AS) are fine but the PLA sub-badge under each isn't self-explanatory (class shorthand per §Artemision).
  • [ok] → ORBITAL SWAP per-row shortcut is a good affordance for MBAs.

Agora tab · Anthemus (SWAP / EXCHANGE / DEPOSIT)

  • [ok] SWAP panel is fully honest: "curve fee 0.30% → LPs" disclosed inline; explainer text distinguishes Anthemus market swap from Orbital Swap (MBA consensus rate). Nothing to fix.
  • [ok] EXCHANGE panel: order book with demo book label, ◌ = pool depth (AMM as maker on the same book) legend, trades table, open orders section. Fee: maker 0% disclosure. Honest and complete.
  • [polish] EXCHANGE demo book label could be a persistent chip near the pair selector so it's harder to miss when scrolling.
  • [verify] EXCHANGE Fee: maker 0% — is there a TAKER fee disclosed elsewhere? Standard DEX pattern is maker 0% / taker 0.3%; if that's the shape, taker fee needs a matching disclosed line on the order form. screens/Anthemus/ExchangePanel.tsx
  • [ok] DEPOSIT panel: demo catalog label + 4-asset choice (USDT, USDC, PYUSD, DAI) is the correspondent-rail entry as per snapshots 0198/0199. Contract wiring is real, UI stub is intentional.

Artemision tab · Create

  • [ok] Wizard entry: "5 steps · immutable at genesis 🔒 · no admin · no recall · no backdoor". Copy is exactly what it should be.
  • [ok] Clean 2×4 taxonomy grid: MBA {DEA, PLA, MCA, MTA} + NBA {PTU, PTL, MTU, MTL} — matches spec v2.7.
  • [polish] ⓘ tooltips on MBA + NBA class headers implied by the icon — verify they actually render a helpful body (class abbreviations DEA/PLA/etc. are otherwise opaque to first-time users).
  • [polish] "5 steps" — a hover/tap peek of the step titles before pressing START would set expectations.

Apps tab

  • [bug — FIXED THIS SESSION] Red banner "account is locked; unlock() first" fired for chipnet dev-wallet mode. See top of this snapshot; fix in useConnect.ts:220-231.
  • [polish] Only 2 GAMES entries (BCH Guru CC, no more). Deviant Labs games (T6, Checkers, etc.) don't appear because they're first-party in-app — deliberate. Consider a separate "Deviant Labs" affordance since the audience for those overlaps with the Apps discover surface.
  • [ok] External-app footer disclaimer: "Community-built, external apps — shown for convenience. Deviant endorses none and ships no blessed list (ADR-0008); add or remove your own."
  • [ok] Network switcher (Mainnet / Chipnet / Testnet) present in the Apps header — decent redundancy with Settings.

Settings

  • [bug — UX] WALLETS: No wallets yet. with a greyed + Add wallet labelled "Needs a seed-based wallet first", while 7 dev wallets are populated in the section immediately below. Technically accurate ("no vault-managed wallets"), but visually confusing. Rename the empty-state text to something like "No vault-managed wallets yet (dev-wallet mode active — see below)", or hide the empty message entirely when a dev wallet is active. screens/SettingsScreen.tsx
  • [bug — terminology] Token definition rows: 100 SAT/UNIT · 1% FEE, 1000 SAT/UNIT · 1% FEE, 100 SAT/UNIT · 1% FEE. Same rule — should read bits/unit. 1% fee casing also worth normalising.
  • [polish] + IMPORT TOKEN DESCRIPTOR — clear affordance, fine.
  • [polish] + ADD REGISTRY · + ADD TRUSTED KEY — the interstitial disclaimer text is a strong statement of intent; consider making the buttons mini so the disclaimer dominates visually (not the buttons).
  • [ok] Network section: Chipnet (recommended) + Testnet4 only — mainnet deliberately omitted for beta. Honest.
  • [ok] Privacy section: CashFusion + Auto-fuse copy is accurate ("Only plain BCH is fused — token (FT) UTXOs are never touched").
  • [ok] DEV WALLETS section: honest scoping "Bundled at build from the repo's .chipnet-keys-*.json files (gitignored, chipnet-only)". Great.
  • [ok] ABOUT: Deviant 0.1.0-beta.1 · spec V2.7.

Header (persistent across MAIN only)

  • [bug — IA] Settings gear (⚙) only renders on MAIN. Reachable from AGORA / ARTEMISION / APPS requires bouncing back to MAIN first. Move gear + currency picker + QR icon into a persistent header, OR add a Settings entry to the tab bar (5-tab layout).

Terminology sweep — the coordinated fix

The sat → bits change is spread across at least 6 render sites. To do it properly:

  1. Identify every user-facing template that emits the string sat / sats.
  2. Change to bit / bits and singular where relevant.
  3. Leave code identifiers alone (rateSats, satoshis etc.). This is per project rule bit ≠ sat.
  4. Check the Preflight / activity/tx screens too (not walked in this pass, but likely offenders).
  5. Regression: no tests should fail — this is copy-only.

Suggested places to grep (project already uses these patterns):

  • screens/MainScreen.tsx — hero, category rows
  • screens/SettingsScreen.tsx — token definitions
  • screens/Anthemus/* — market copy
  • screens/AssetDetail.tsx — detail cards
  • Anywhere that formats a numeric with .toLocaleString() + ' sat'

Estimated: ~20 sites, one focused pass, no logic change.


Not walked this pass — for a follow-up

  • AssetDetail.tsx — single-asset drill-down (need to click into an individual token)
  • ActivityScreen.tsx — activity feed
  • SweepFlow.tsx / FuseFlow.tsx / ConsolidateFlow.tsx — flow screens
  • SignMessageScreen.tsx — sign-verify
  • AppsScreen.tsx sign-request preview (SigningPreview at :689) — visited in read-only mode via WZ punch-list work, not driven here
  • Onboarding CREATE / RESTORE / IMPORT flows (only DEV path was used)
  • Katalogos add-asset modal (components/TokenImportModal.tsx)

Pointers

  • Live-fixed file: shells/app/src/connect/useConnect.ts lines 220-231
  • Suspects for terminology sweep: screens/MainScreen.tsx, screens/SettingsScreen.tsx, screens/Anthemus/, screens/AssetDetail.tsx
  • Working notes (draft, superseded by this snapshot): snapshots/wallet-audit-workspace.md
  • Related project rule: bit ≠ sat — user-facing unit is bit / bits; code identifiers stay.