Skip to content

Commit 113e1a9

Browse files
committed
address gh comment
1 parent 43d5580 commit 113e1a9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/thirdweb/src/react/web/ui/TransactionButton/TransactionModal.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ export function TransactionModal(props: ModalProps) {
3737
useQuery({
3838
queryKey: ["transaction-modal-event"],
3939
queryFn: () => {
40-
// Query data cannot be undefined, return null
4140
if (!account || !wallet) {
42-
return null;
41+
throw new Error(); // never happens, because enabled is false
4342
}
4443
trackPayEvent({
4544
client: props.client,
@@ -51,7 +50,7 @@ export function TransactionModal(props: ModalProps) {
5150

5251
return null;
5352
},
54-
enabled: !!wallet,
53+
enabled: !!wallet && !!account,
5554
});
5655

5756
return (

0 commit comments

Comments
 (0)