From be0875c86d3eca87f309057ac470c707e5884f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Estev=C3=A3o?= Date: Wed, 3 Dec 2025 19:15:33 -0300 Subject: [PATCH 1/4] fix: optional props, wait for loading before being able to click button --- react/lib/components/Widget/Widget.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/react/lib/components/Widget/Widget.tsx b/react/lib/components/Widget/Widget.tsx index ea71a9d5..108a29e7 100644 --- a/react/lib/components/Widget/Widget.tsx +++ b/react/lib/components/Widget/Widget.tsx @@ -64,11 +64,11 @@ export interface WidgetProps { disablePaymentId?: boolean text?: string ButtonComponent?: React.ComponentType - success: boolean + success?: boolean successText?: string theme?: ThemeName | Theme foot?: React.ReactNode - disabled: boolean + disabled?: boolean goalAmount?: number | string | null currency?: Currency animation?: animation @@ -1267,7 +1267,7 @@ export const Widget: React.FunctionComponent = props => { text: widgetButtonText, hoverText, onClick: handleButtonClick, - disabled: isPropsTrue(disabled), + disabled: isPropsTrue(disabled) || qrLoading, animation, size: 'medium', }) From 53bd0d3a28cad9fd5f4d65d577c323d8ef035e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Estev=C3=A3o?= Date: Wed, 3 Dec 2025 19:16:44 -0300 Subject: [PATCH 2/4] fix: don't allow copying qrcode before paymentId loads --- react/lib/components/Widget/Widget.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/lib/components/Widget/Widget.tsx b/react/lib/components/Widget/Widget.tsx index 108a29e7..84b63cca 100644 --- a/react/lib/components/Widget/Widget.tsx +++ b/react/lib/components/Widget/Widget.tsx @@ -947,7 +947,7 @@ export const Widget: React.FunctionComponent = props => { } const handleQrCodeClick = useCallback((): void => { - if (disabled || to === undefined) return + if (disabled || to === undefined || qrLoading) return if (!url || !copyToClipboard(url)) return setCopied(true) setRecentlyCopied(true) From 1d46dbe9ed3efeb66b0aed0b11d97b9c87e14999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Estev=C3=A3o?= Date: Thu, 4 Dec 2025 05:55:10 -0300 Subject: [PATCH 3/4] chore: v5.1.2 --- package.json | 2 +- paybutton/package.json | 2 +- react/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0b02bb69..3fecf301 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "paybutton", - "version": "5.1.1", + "version": "5.1.2", "description": "The easiest way to accept eCash online", "author": "Blockchain Ventures Corp.", "main": "index.js", diff --git a/paybutton/package.json b/paybutton/package.json index d3834fd4..24524629 100644 --- a/paybutton/package.json +++ b/paybutton/package.json @@ -1,6 +1,6 @@ { "name": "@paybutton/paybutton", - "version": "5.1.1", + "version": "5.1.2", "description": "The easiest way to accept eCash online", "author": "", "main": "dist/paybutton.js", diff --git a/react/package.json b/react/package.json index 905a1c75..b8c878cd 100644 --- a/react/package.json +++ b/react/package.json @@ -1,6 +1,6 @@ { "name": "@paybutton/react", - "version": "5.1.1", + "version": "5.1.2", "description": "The easiest way to accept eCash online", "author": "Blockchain Ventures Corp.", "license": "MIT", From 85d53aefbc5e289fbc4cb58a8b0ebea4f041f653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Estev=C3=A3o?= Date: Thu, 4 Dec 2025 18:56:58 -0300 Subject: [PATCH 4/4] fix: props dependency --- react/lib/components/Widget/Widget.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/lib/components/Widget/Widget.tsx b/react/lib/components/Widget/Widget.tsx index 84b63cca..9c6389a8 100644 --- a/react/lib/components/Widget/Widget.tsx +++ b/react/lib/components/Widget/Widget.tsx @@ -951,7 +951,7 @@ export const Widget: React.FunctionComponent = props => { if (!url || !copyToClipboard(url)) return setCopied(true) setRecentlyCopied(true) - }, [disabled, to, url, setCopied, setRecentlyCopied]) + }, [disabled, to, url, setCopied, setRecentlyCopied, qrLoading]) const resolveUrl = useCallback((currency: string, amount?: number) => { if (disabled || !to) return;