From 8a24b30b2a8642339122dd1292c2033579359358 Mon Sep 17 00:00:00 2001 From: nate Date: Thu, 19 Mar 2026 00:49:32 +0400 Subject: [PATCH] update: hopefully.... --- apps/web/src/views/checkout.ejs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/web/src/views/checkout.ejs b/apps/web/src/views/checkout.ejs index 67bd38b..51fb5a7 100644 --- a/apps/web/src/views/checkout.ejs +++ b/apps/web/src/views/checkout.ejs @@ -257,7 +257,6 @@ watchedAddress = address; watchedTxids = []; - // Raw SSE — no query filter at all eventSource = new EventSource(`${SOCK_API}/sse`); console.log('SSE: connected, watching for', address); @@ -289,7 +288,6 @@ Transaction detected, waiting for confirmation... `; - pollStatus(); return; } } @@ -299,7 +297,12 @@ const blockTxs = event.data?.tx ?? []; if (watchedTxids.some(t => blockTxs.includes(t))) { console.log('SSE: block confirmed our tx'); - pollStatus(); + // Show confirmed immediately, poll will finalize with backend + clearInterval(countdownInterval); + if (eventSource) { eventSource.close(); eventSource = null; } + document.getElementById('pay-status-section').classList.add('hidden'); + document.getElementById('pay-success').classList.remove('hidden'); + setTimeout(() => { window.location.href = '/dashboard/settings'; }, 3000); } }