From 3cbac371ed7408f6db0a5c38c02649b5bb3c8d1b Mon Sep 17 00:00:00 2001 From: lissavxo Date: Tue, 17 Jun 2025 13:20:12 -0300 Subject: [PATCH 1/4] feat: autoclose false --- react/lib/components/PayButton/PayButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/lib/components/PayButton/PayButton.tsx b/react/lib/components/PayButton/PayButton.tsx index 31d7535e..831fa6f1 100644 --- a/react/lib/components/PayButton/PayButton.tsx +++ b/react/lib/components/PayButton/PayButton.tsx @@ -367,7 +367,7 @@ const payButtonDefaultProps: PayButtonProps = { disableEnforceFocus: false, disabled: false, editable: false, - autoClose: true, + autoClose: false, }; PayButton.defaultProps = payButtonDefaultProps; From dd3c36d6e32c73506f9816b1d6217368335edc55 Mon Sep 17 00:00:00 2001 From: lissavxo Date: Tue, 17 Jun 2025 13:20:23 -0300 Subject: [PATCH 2/4] feat: disable undoing sucess --- react/lib/components/PaymentDialog/PaymentDialog.tsx | 1 - react/lib/components/Widget/WidgetContainer.tsx | 3 --- 2 files changed, 4 deletions(-) diff --git a/react/lib/components/PaymentDialog/PaymentDialog.tsx b/react/lib/components/PaymentDialog/PaymentDialog.tsx index 4414575f..6628b90b 100644 --- a/react/lib/components/PaymentDialog/PaymentDialog.tsx +++ b/react/lib/components/PaymentDialog/PaymentDialog.tsx @@ -140,7 +140,6 @@ export const PaymentDialog = ( setSuccess(true); onSuccess?.(transaction); setTimeout(() => { - setSuccess(false); if (autoClose === true) { handleWidgetClose(); } diff --git a/react/lib/components/Widget/WidgetContainer.tsx b/react/lib/components/Widget/WidgetContainer.tsx index 8f82fff8..a43e1d66 100644 --- a/react/lib/components/Widget/WidgetContainer.tsx +++ b/react/lib/components/Widget/WidgetContainer.tsx @@ -198,9 +198,6 @@ export const WidgetContainer: React.FunctionComponent = ); setSuccess(true); onSuccess?.(transaction); - setTimeout(() => { - setSuccess(false); - }, 3000); } else { onTransaction?.(transaction); if (transactionText){ From fec0e8d83ad201e80e710d5778285d28788e0762 Mon Sep 17 00:00:00 2001 From: lissavxo Date: Tue, 17 Jun 2025 13:22:57 -0300 Subject: [PATCH 3/4] feat: autoclose generator --- paybutton/dev/demo/paybutton-generator.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/paybutton/dev/demo/paybutton-generator.html b/paybutton/dev/demo/paybutton-generator.html index 897af42a..76d55e00 100644 --- a/paybutton/dev/demo/paybutton-generator.html +++ b/paybutton/dev/demo/paybutton-generator.html @@ -181,6 +181,11 @@ false-value="false"> +
+ + +
@@ -213,6 +218,7 @@ :on-transaction="myTransactionFuction" :disable-altpayment="paybuttonProps.disableAltpayment" :transaction-text="paybuttonProps.transactionText" + :auto-close="paybuttonProps.autoClose" :op-return="paybuttonProps.opReturn">
@@ -247,7 +253,8 @@ opReturn:undefined, transactiontext: '', onSuccess: mySuccessFuction, - onTransaction: myTransactionFuction + onTransaction: myTransactionFuction, + autoClose: true }); const paybuttonType = ref("paybutton"); const updateProps = () => { From 61c0d738d844b2e7e126d10b4bd59d6dbd24f452 Mon Sep 17 00:00:00 2001 From: lissavxo Date: Thu, 19 Jun 2025 17:41:06 -0300 Subject: [PATCH 4/4] fix: auto close --- react/lib/components/PaymentDialog/PaymentDialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/lib/components/PaymentDialog/PaymentDialog.tsx b/react/lib/components/PaymentDialog/PaymentDialog.tsx index 6628b90b..eefc1832 100644 --- a/react/lib/components/PaymentDialog/PaymentDialog.tsx +++ b/react/lib/components/PaymentDialog/PaymentDialog.tsx @@ -140,7 +140,7 @@ export const PaymentDialog = ( setSuccess(true); onSuccess?.(transaction); setTimeout(() => { - if (autoClose === true) { + if (isPropsTrue(autoClose)) { handleWidgetClose(); } }, 3000);