We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43d5580 commit 113e1a9Copy full SHA for 113e1a9
packages/thirdweb/src/react/web/ui/TransactionButton/TransactionModal.tsx
@@ -37,9 +37,8 @@ export function TransactionModal(props: ModalProps) {
37
useQuery({
38
queryKey: ["transaction-modal-event"],
39
queryFn: () => {
40
- // Query data cannot be undefined, return null
41
if (!account || !wallet) {
42
- return null;
+ throw new Error(); // never happens, because enabled is false
43
}
44
trackPayEvent({
45
client: props.client,
@@ -51,7 +50,7 @@ export function TransactionModal(props: ModalProps) {
51
50
52
return null;
53
},
54
- enabled: !!wallet,
+ enabled: !!wallet && !!account,
55
});
56
57
return (
0 commit comments