Skip to content

Commit 7890145

Browse files
[SDK] fix: Enforce requireApproval option for wallet connection (#6505)
1 parent 47f8cd6 commit 7890145

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/full-games-end.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix requireApproval option not enforced for wallet connection

packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
183183
props.selectWallet(localWalletConfig);
184184
}}
185185
data-test="continue-as-guest-button"
186+
disabled={props.meta.requireApproval && !approvedTOS}
186187
>
187188
{props.connectLocale.continueAsGuest}
188189
</Button>
@@ -227,6 +228,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
227228
<WalletTypeRowButton
228229
client={props.client}
229230
icon={OutlineWalletIcon}
231+
disabled={props.meta.requireApproval && !approvedTOS}
230232
onClick={() => {
231233
setIsWalletGroupExpanded(true);
232234
}}

0 commit comments

Comments
 (0)