diff --git a/src/pages/block-sync/block-sync.html b/src/pages/block-sync/block-sync.html index 664bc4d..8e8bd89 100644 --- a/src/pages/block-sync/block-sync.html +++ b/src/pages/block-sync/block-sync.html @@ -180,7 +180,7 @@ diff --git a/src/pages/block-sync/block-sync.ts b/src/pages/block-sync/block-sync.ts index 312997e..8a17b2c 100644 --- a/src/pages/block-sync/block-sync.ts +++ b/src/pages/block-sync/block-sync.ts @@ -180,7 +180,14 @@ document.addEventListener("DOMContentLoaded", async () => { updateProgress(100); updateSyncItem('blocksScanned', lastScan.toString(), 'completed'); updateSyncItem('blocksToScan', '0', 'completed'); + + // Redirection automatique après 3 secondes + updateStatus('✅ Redirection automatique vers le pairing dans 3 secondes...', 'success'); continueBtn.disabled = false; + setTimeout(() => { + console.log('🔗 Auto-redirecting to pairing page...'); + window.location.href = '/src/pages/home/home.html'; + }, 3000); return; } @@ -214,6 +221,13 @@ document.addEventListener("DOMContentLoaded", async () => { } console.log('🎉 Block sync completed successfully'); + + // Redirection automatique après 3 secondes + updateStatus('✅ Redirection automatique vers le pairing dans 3 secondes...', 'success'); + setTimeout(() => { + console.log('🔗 Auto-redirecting to pairing page...'); + window.location.href = '/src/pages/home/home.html'; + }, 3000); } else { throw new Error('Failed to verify wallet update - last_scan not found'); }