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:28 -04:00
parent 2d8fee45b6
commit 9584cc37ed
+1 -1
View File
@@ -130,7 +130,7 @@ export default function BtcpayClassicCheckout({
: null;
useEffect(() => {
if (status !== "confirmed" || !redirectUrl || !redirectAutomatically) {
if ((status !== "confirmed" && status !== "payment_detected") || !redirectUrl || !redirectAutomatically) {
return;
}
const timer = window.setTimeout(() => {