diff --git a/.changeset/bumpy-shoes-flow.md b/.changeset/bumpy-shoes-flow.md new file mode 100644 index 00000000000..a18e882172e --- /dev/null +++ b/.changeset/bumpy-shoes-flow.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +Fix BuyWidget autoconnect not working when receiverAddress prop is set diff --git a/packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx b/packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx index f79eece83cf..989b981787c 100644 --- a/packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx +++ b/packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx @@ -25,6 +25,7 @@ import type { import type { CompletedStatusResult } from "../../../core/hooks/useStepExecutor.js"; import type { SupportedTokens } from "../../../core/utils/defaultTokens.js"; import { webWindowAdapter } from "../../adapters/WindowAdapter.js"; +import { AutoConnect } from "../AutoConnect/AutoConnect.js"; import connectLocaleEn from "../ConnectWallet/locale/en.js"; import { EmbedContainer } from "../ConnectWallet/Modal/ConnectEmbed.js"; import { DynamicHeight } from "../components/DynamicHeight.js"; @@ -359,6 +360,21 @@ export function BuyWidget(props: BuyWidgetProps) { className={props.className} style={props.style} > + {props.connectOptions?.autoConnect !== false && ( + + )} + ) : (