diff --git a/src/pages/home/home.ts b/src/pages/home/home.ts index fbf4cd4..9dade17 100755 --- a/src/pages/home/home.ts +++ b/src/pages/home/home.ts @@ -153,10 +153,6 @@ export async function initHomePage(): Promise { console.log('🔐 Auto-triggering WebAuthn authentication...'); await handleMainPairing(); - // Display existing processes even if authentication fails - console.log('📊 Displaying existing processes...'); - await displayExistingProcesses(); - // Hide loading spinner after initialization console.log('🔧 Hiding loading spinner...'); hideHomeLoadingSpinner(); @@ -585,9 +581,6 @@ async function handleMainPairing(): Promise { // Now proceed with pairing process await prepareAndSendPairingTx(); - // Display any existing processes in the status field - await displayExistingProcesses(); - } catch (error) { console.error('Pairing failed:', error); @@ -597,56 +590,6 @@ async function handleMainPairing(): Promise { } } -// Display existing processes in the status field -async function displayExistingProcesses(): Promise { - try { - const service = await Services.getInstance(); - const processes = await service.getProcesses(); - - const container = getCorrectDOM('login-4nk-component') as HTMLElement; - const mainStatus = container.querySelector('#main-status') as HTMLElement; - - if (!mainStatus) { - console.warn('Main status element not found'); - return; - } - - const processCount = Object.keys(processes).length; - console.log(`📊 Found ${processCount} existing processes`); - - if (processCount === 0) { - if (mainStatus) { - mainStatus.innerHTML = '📋 No existing processes found'; - } - return; - } - - // Display all processes as simple text - let allMessages = ''; - for (const [processId, process] of Object.entries(processes)) { - const processInfo = { - id: processId.substring(0, 8) + '...', - states: process.states?.length || 0, - members: Object.keys(process.members || {}).length, - lastUpdate: process.last_update || 'Unknown' - }; - - allMessages += `📋 Process ${processInfo.id} - States: ${processInfo.states}, Members: ${processInfo.members}, Updated: ${processInfo.lastUpdate}\n`; - } - - if (mainStatus) { - mainStatus.innerHTML = `
${allMessages}
`; - } - - } catch (error) { - console.error('❌ Error displaying processes:', error); - const container = getCorrectDOM('login-4nk-component') as HTMLElement; - const mainStatus = container.querySelector('#main-status') as HTMLElement; - if (mainStatus) { - mainStatus.innerHTML = '❌ Error loading processes'; - } - } -} // Account Actions export function setupAccountActions(): void {