diff --git a/.changeset/light-signs-send.md b/.changeset/light-signs-send.md new file mode 100644 index 00000000000..3636a1f118a --- /dev/null +++ b/.changeset/light-signs-send.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +Do not require connecting wallet in `BuyWidget` if `receiverAddress` 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 ef1441d65e2..f79eece83cf 100644 --- a/packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx +++ b/packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx @@ -39,7 +39,6 @@ import { PaymentSelection } from "./payment-selection/PaymentSelection.js"; import { SuccessScreen } from "./payment-success/SuccessScreen.js"; import { QuoteLoader } from "./QuoteLoader.js"; import { StepRunner } from "./StepRunner.js"; -import { useActiveWalletInfo } from "./swap-widget/hooks.js"; import type { PaymentMethod, RequiredParams } from "./types.js"; export type BuyOrOnrampPrepareResult = Extract< @@ -432,7 +431,6 @@ function BridgeWidgetContent( >, ) { const [screen, setScreen] = useState({ id: "1:buy-ui" }); - const activeWalletInfo = useActiveWalletInfo(); const handleError = useCallback( (error: Error, quote: BridgePrepareResult | undefined) => { @@ -478,7 +476,7 @@ function BridgeWidgetContent( }; }); - if (screen.id === "1:buy-ui" || !activeWalletInfo) { + if (screen.id === "1:buy-ui") { return ( + ) : ( - ) : ( - )} {props.showThirdwebBranding ? (