Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gentle-dancers-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix thirdweb Pay Modal logging react-query error when opened
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,20 @@ export function TransactionModal(props: ModalProps) {
useQuery({
queryKey: ["transaction-modal-event"],
queryFn: () => {
if (!account || !wallet) return;
if (!account || !wallet) {
throw new Error(); // never happens, because enabled is false
}
trackPayEvent({
client: props.client,
walletAddress: account.address,
walletType: wallet.id,
dstChainId: props.tx.chain.id,
event: "open_pay_transaction_modal",
});

return null;
},
enabled: !!wallet,
enabled: !!wallet && !!account,
});

return (
Expand Down
Loading