OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-wallet commits / 246273f

Phase 2: Fix unauthenticated data loading errors
- Only load wallet data if authenticated (has token) - Prevents storage lock errors when password dialog shown - Added defensive logging for dialog element checks - Fixes Corestore closed and FD lock errors Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
246273f2e91362e13fd8d6a88b94fabd9c1aa14f
by plankatron <fleeky@gmail.com> · 2026-01-27T20:53:46.000Z

Changed files (2) +19 -2

.claude/tmux-registry.json +1 -1
……@@ -8,7 +8,7 @@
88 "purpose": "Seeding pear://18x3enb54ttcr6uuhg5hh1cqzwi8ydnm658fmgyyjkzoqxd1ybso",
99 "command": "pear seed pear://18x3enb54ttcr6uuhg5hh1cqzwi8ydnm658fmgyyjkzoqxd1ybso .",
1010 "persistent": true,
11 "latest_version": "11455",
11 "latest_version": "11460",
1212 "last_deployed": "2026-01-27",
1313 "features": "Phase 2 COMPLETE: Auth + Encryption + Validation + Rate Limiting + CORS + Signed Invites + Password Unlock UI ✅"
1414 },
ui/app.js +18 -1
……@@ -2199,10 +2199,14 @@ async function promptForPassword() {
21992199 const maxAttempts = 3
22002200 let attempts = 0
22012201
2202 console.log('🔐 promptForPassword() called')
2203
22022204 // Check if this is first-time password setup or regular unlock
22032205 const isEncrypted = await checkEncryptionStatus()
22042206 const isFirstTimeSetup = isEncrypted === false
22052207
2208 console.log('📊 Encryption status:', { isEncrypted, isFirstTimeSetup })
2209
22062210 return new Promise((resolve) => {
22072211 const dialog = document.getElementById('password-dialog')
22082212 const titleEl = document.getElementById('password-dialog-title')
……@@ -2218,6 +2222,16 @@ async function promptForPassword() {
22182222 const cancelBtn = document.getElementById('password-cancel-btn')
22192223 const attemptsEl = document.getElementById('password-attempts')
22202224
2225 // Check if all elements exist
2226 if (!dialog || !passwordInput || !submitBtn) {
2227 console.error('❌ Password dialog elements not found!')
2228 console.error({ dialog, passwordInput, submitBtn })
2229 resolve(false)
2230 return
2231 }
2232
2233 console.log('✅ Password dialog elements found')
2234
22212235 // Configure dialog for first-time setup vs unlock
22222236 if (isFirstTimeSetup) {
22232237 titleEl.textContent = '⚠️ SET WALLET PASSWORD'
……@@ -2457,12 +2471,15 @@ async function init() {
24572471 // Fetch prices first (don't wait)
24582472 fetchPrices()
24592473
2460 if (initialized) {
2474 // Only load wallet data if initialized AND authenticated
2475 if (initialized && getToken()) {
24612476 await Promise.all([
24622477 loadCurrentBalance(),
24632478 loadCurrentQRCode(),
24642479 loadTransactions()
24652480 ])
2481 } else if (initialized && !getToken()) {
2482 console.warn('⚠️ Wallet initialized but not authenticated - waiting for password')
24662483 }
24672484
24682485 // Auto-refresh every 30 seconds