From e600a35b7a02de37b1937f3a55ddfe8d3c390991 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 23 Feb 2026 07:27:51 +0000 Subject: [PATCH] [SDK] Add requireApproval option to useConnectModalOptions - Added requireApproval property to UseConnectModalOptions type - Pass requireApproval through to ConnectModal meta object - Matches functionality available in ConnectButton and ConnectEmbed Co-authored-by: Yash --- .../web/ui/ConnectWallet/useConnectModal.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/thirdweb/src/react/web/ui/ConnectWallet/useConnectModal.tsx b/packages/thirdweb/src/react/web/ui/ConnectWallet/useConnectModal.tsx index a1048c27657..115bbfad6df 100644 --- a/packages/thirdweb/src/react/web/ui/ConnectWallet/useConnectModal.tsx +++ b/packages/thirdweb/src/react/web/ui/ConnectWallet/useConnectModal.tsx @@ -118,6 +118,7 @@ function Modal( termsOfServiceUrl: props.termsOfServiceUrl, title: props.title, titleIconUrl: props.titleIcon, + requireApproval: props.requireApproval, }; }, [ props.privacyPolicyUrl, @@ -125,6 +126,7 @@ function Modal( props.termsOfServiceUrl, props.title, props.titleIcon, + props.requireApproval, ]); return ( @@ -449,6 +451,22 @@ export type UseConnectModalOptions = { * Refer to the [`SiweAuthOptions`](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions) for more details */ auth?: SiweAuthOptions; + + /** + * Require terms of service and privacy policy to be accepted before connecting an in-app wallet. + * + * By default it's `false` + * @example + * ```tsx + * function Example() { + * const { connect } = useConnectModal(); + * return + * } + * ``` + */ + requireApproval?: boolean; }; // TODO: consilidate Button/Embed/Modal props into one type with extras