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/lib/components/Widget/Widget.tsx b/react/lib/components/Widget/Widget.tsx index ea71a9d5..9c6389a8 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 @@ -947,11 +947,11 @@ 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) - }, [disabled, to, url, setCopied, setRecentlyCopied]) + }, [disabled, to, url, setCopied, setRecentlyCopied, qrLoading]) const resolveUrl = useCallback((currency: string, amount?: number) => { if (disabled || !to) return; @@ -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', }) 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",