Skip to content

fix(unlock): choose wallet in Full Unlock instead of auto-minting local - #247

Merged
zo-sol merged 1 commit into
mainfrom
fix/unlock-wallet-choice
Sep 25, 2026
Merged

zo-sol merged 1 commit into
mainfrom
fix/unlock-wallet-choice

Conversation

@zo-sol

@zo-sol zo-sol commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

What & why

Switching the local wallet was broken in the Full Unlock tutorial.

  • Disconnect (disconnectWallet) correctly clears wallet-mode.json and keeps the device keypair (~/.config/solana/id.json) — as intended.
  • But requestUnlock() fired makeLocalWallet immediately and showed a creating spinner. Since localWallet() never deletes/overwrites the keyfile, redoing the tutorial silently re-adopted the same local wallet → the wallet step got skipped and there was no way to choose Phantom.

Fix

  • Replace the auto-mint creating screen with a choose screen that renders the canonical <ConnectWallet embedded /> chooser (device wallet or Phantom/web wallet). One source of truth for wallet detection/connect — no duplicated picker logic.
  • requestUnlock no longer sends makeLocalWallet; the user picks. Both paths still end in a walletConnected push that flips unlocked, and the existing effect advances to Fund.
  • The local keyfile is preserved — picking "device wallet" reuses it exactly as before.
  • i18n: creatingTitle/creatingBody → chooseTitle/chooseStatus/chooseBody (en/ko/ru).

Behavior

  • Fresh user → choose screen → pick device or Phantom → Fund → … → Unlocked.
  • Disconnect, then re-run tutorial (device keypair still on disk) → choose screen appears, Phantom selectable. ✅

Docs

Adds install-guide/github-token.md: how the GitHub token is injected into agents (GH_TOKEN/credential helper), where it lives (~/.agentnet/tokens/github.json), and how to register one in Settings → GitHub when missing — so agents don't get stuck hunting for it.

Testing

Static review only — the npm registry was unreachable in my environment, so I could not run vite build/tsc/vitest. Please let CI run. Changes are contained to surfaces/webview (unlock provider + i18n) and docs.

🤖 Generated with Claude Code

…inting local

The Full Unlock tutorial fired makeLocalWallet on open and showed a "creating"
spinner. Because the device keypair at ~/.config/solana/id.json is never deleted
on disconnect, redoing the tutorial silently re-adopted the same local wallet —
so a user who disconnected to switch wallets got the wallet step skipped, with no
way to choose Phantom.

Replace the auto-mint `creating` screen with a `choose` screen that renders the
canonical ConnectWallet chooser (device wallet or Phantom/web wallet). No wallet
is minted until the user picks; both paths still end in walletConnected → Fund.
The local keyfile is untouched — picking "device wallet" reuses it as before.

Also add install-guide/github-token.md so agents know the GitHub token is injected
via GH_TOKEN/credential-helper, where it's stored (~/.agentnet/tokens/github.json),
and to tell the user to register one in Settings → GitHub when it's missing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@zo-sol
zo-sol merged commit 3854d41 into main Sep 25, 2026
1 check passed
@zo-sol
zo-sol deleted the fix/unlock-wallet-choice branch September 25, 2026 11:51
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