Skip to content

Commit

Permalink
Merge pull request #311 from PayButton/fix/widget-container-renderiza…
Browse files Browse the repository at this point in the history
…tion

[#289] fix: widget container renderization
  • Loading branch information
Klakurka authored Jan 7, 2024
2 parents 62492ea + f38f968 commit 663aa0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions paybutton/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import camelcase from 'camelcase';
import { PayButton, PayButtonProps, PaymentDialog, PaymentDialogProps, Widget, WidgetProps } from 'paybutton';
import { h } from 'preact';
import { render } from 'preact/compat';
import WidgetContainer from 'paybutton/dist/components/Widget/WidgetContainer';

declare global {
interface Window {
Expand Down Expand Up @@ -239,7 +238,7 @@ export default {
renderWidget: (el: HTMLElement, props: WidgetProps) => {
if (el !== null) {
validateJSProps(props)
render(<WidgetContainer {...props} />, el)
render(<Widget {...props} />, el)
}
},
openDialog: (props: PaymentDialogProps) => openDialog(props)
Expand Down
2 changes: 1 addition & 1 deletion react/src/components/Widget/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export const Widget: React.FC<WidgetProps> = props => {
setUrl(url);
}
}
}, [currencyObject, price, amount]);
}, [to, currencyObject, price, amount]);

const handleButtonClick = () => {
if (addressType === 'XEC'){
Expand Down

0 comments on commit 663aa0f

Please sign in to comment.