feat: Display 4 words immediately after credentials generation

**Motivations :**
- Show 4 words to user as soon as credentials are generated
- Improve user experience by not waiting for full pairing process

**Modifications :**
- Moved generateWordsDisplay call to execute right after address is obtained
- Removed duplicate call at end of pairing process
- Users now see words immediately after WebAuthn authentication

**Pages affectées :**
- src/utils/sp-address.utils.ts - Early 4 words display
This commit is contained in:
NicolasCantu 2025-10-23 19:52:10 +02:00
parent d419a28c2f
commit ee7b4c8545

View File

@ -2743,6 +2743,10 @@ export async function prepareAndSendPairingTx(): Promise<void> {
// Update UI with creator address
updateCreatorStatus(`Creator address: ${creatorAddress}`);
// Generate 4 words representation for the joiner immediately
console.log(`🔍 DEBUG: Generating 4 words representation for joiner...`);
await generateWordsDisplay(creatorAddress);
// Secure credentials already initialized in the click handler
// Create pairing process with creator's address
@ -2762,10 +2766,6 @@ export async function prepareAndSendPairingTx(): Promise<void> {
await service.handleApiReturn(createPairingProcessReturn);
// Generate 4 words representation for the joiner
console.log(`🔍 DEBUG: Generating 4 words representation for joiner...`);
await generateWordsDisplay(creatorAddress);
console.log(`✅ DEBUG: Creator pairing process created and 4 words generated`);
console.log(`⏳ DEBUG: Creator waiting for joiner to enter 4 words...`);
} catch (err) {