OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-wallet commits / 8fa8b76

Phase 2: Fix storage initialization blocking on DHT
- Don't await discovery.flushed() - let it happen in background - Storage initialization completes immediately - DHT announcement happens asynchronously - Fixes hanging initialization that blocked all functionality Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
8fa8b7639c3a2c1cf7315af941654e5cf6e68c70
by plankatron <fleeky@gmail.com> · 2026-01-27T21:03:38.000Z

Changed files (2) +9 -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": "11464",
11 "latest_version": "11468",
1212 "last_deployed": "2026-01-27",
1313 "features": "Phase 2 COMPLETE: Auth + Encryption + Validation + Rate Limiting + CORS + Signed Invites + Password Unlock UI ✅"
1414 },
lib/wallet-storage.cjs +8 -1
……@@ -225,8 +225,15 @@ async function _initializeStorage(identity) {
225225 // Join discovery key for this wallet
226226 const discoveryKey = crypto.discoveryKey(identityKeyPair.publicKey)
227227 const discovery = swarm.join(discoveryKey, { server: true, client: true })
228 await discovery.flushed()
229228
229 // Flush in background - don't block initialization on DHT announcement
230 discovery.flushed().then(() => {
231 console.log('📡 DHT discovery announced')
232 }).catch(err => {
233 console.warn('⚠️ DHT discovery flush failed:', err.message)
234 })
235
236 console.log('✅ Storage initialized successfully')
230237 return { store, autobase, txHistoryDb, swarm }
231238}
232239