fix: auto-redirect on payment detection (0-conf), not just confirmation

The checkout UI only redirected when status was 'confirmed' (after all
N confirmations). Now also redirects on 'payment_detected' (0-conf in
mempool). This matches BTCPay's behavior for BTC/LTC where the customer
is redirected to the store immediately on detection.
This commit is contained in:
jwinterm
2026-04-13 10:03:53 -04:00
parent 7f7f7f5b3e
commit cc20773dda
+1 -1
View File
@@ -130,7 +130,7 @@ export default function BtcpayClassicCheckout({
: null; : null;
useEffect(() => { useEffect(() => {
if (status !== "confirmed" || !redirectUrl || !redirectAutomatically) { if ((status !== "confirmed" && status !== "payment_detected") || !redirectUrl || !redirectAutomatically) {
return; return;
} }
const timer = window.setTimeout(() => { const timer = window.setTimeout(() => {