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);
}
}