Full document, spreadsheet, slideshow, and diagram tooling
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: retry recovery passphrase instead of dismissing to local mode

Wrong passphrase now loops back to the passphrase prompt instead of
setting _dismissed and letting the user through without PDS sync.
Only cancelling the modal dismisses.

+12 -12
+12 -12
src/lib/pds-setup.ts
··· 78 78 } 79 79 80 80 async function promptRecovery(session: AtmosSession): Promise<boolean> { 81 - const passphrase = await showPassphraseModal('unlock'); 82 - if (!passphrase) { _dismissed = true; return false; } 81 + for (;;) { 82 + const passphrase = await showPassphraseModal('unlock'); 83 + if (!passphrase) { _dismissed = true; return false; } 83 84 84 - try { 85 - await recoverIdentity(session.agent, session.did, passphrase); 86 - _initialized = true; 87 - notify('Keys recovered — PDS sync active.'); 88 - return true; 89 - } catch (err) { 90 - console.error('Key recovery failed:', err); 91 - notify('Key recovery failed — wrong passphrase?', true); 92 - _dismissed = true; 93 - return false; 85 + try { 86 + await recoverIdentity(session.agent, session.did, passphrase); 87 + _initialized = true; 88 + notify('Keys recovered — PDS sync active.'); 89 + return true; 90 + } catch (err) { 91 + console.error('Key recovery failed:', err); 92 + notify('Key recovery failed — wrong passphrase. Try again.', true); 93 + } 94 94 } 95 95 } 96 96