Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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,14 +37,19 @@ export function TransactionModal(props: ModalProps) {
useQuery({
queryKey: ["transaction-modal-event"],
queryFn: () => {
if (!account || !wallet) return;
// Query data cannot be undefined, return null
if (!account || !wallet) {
return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it just throw instead so it retries later?

also should we add !!account to enabled prop below?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

}
trackPayEvent({
client: props.client,
walletAddress: account.address,
walletType: wallet.id,
dstChainId: props.tx.chain.id,
event: "open_pay_transaction_modal",
});

return null;
},
enabled: !!wallet,
});
Expand Down
Loading