From 0ca2d63161d17f62434d1ed169a1864f58f40770 Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Tue, 14 Nov 2023 19:06:49 +0300 Subject: [PATCH] Enable contract queries without a wallet connection --- pages/contracts/badgeHub/query.tsx | 2 +- pages/contracts/baseMinter/query.tsx | 2 +- pages/contracts/openEditionMinter/query.tsx | 2 +- pages/contracts/royaltyRegistry/query.tsx | 2 +- pages/contracts/sg721/query.tsx | 2 +- pages/contracts/splits/query.tsx | 2 +- pages/contracts/vendingMinter/query.tsx | 2 +- pages/contracts/whitelist/query.tsx | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/contracts/badgeHub/query.tsx b/pages/contracts/badgeHub/query.tsx index f82db9a..515630b 100644 --- a/pages/contracts/badgeHub/query.tsx +++ b/pages/contracts/badgeHub/query.tsx @@ -106,7 +106,7 @@ const BadgeHubQueryPage: NextPage = () => { onError: (error: any) => { toast.error(error.message, { style: { maxWidth: 'none' } }) }, - enabled: Boolean(contractAddress && contract && wallet.isWalletConnected), + enabled: Boolean(contractAddress && contract), }, ) diff --git a/pages/contracts/baseMinter/query.tsx b/pages/contracts/baseMinter/query.tsx index fd87452..0e9b384 100644 --- a/pages/contracts/baseMinter/query.tsx +++ b/pages/contracts/baseMinter/query.tsx @@ -58,7 +58,7 @@ const BaseMinterQueryPage: NextPage = () => { onError: (error: any) => { toast.error(error.message, { style: { maxWidth: 'none' } }) }, - enabled: Boolean(contractAddress && contract && wallet.isWalletConnected), + enabled: Boolean(contractAddress && contract), }, ) diff --git a/pages/contracts/openEditionMinter/query.tsx b/pages/contracts/openEditionMinter/query.tsx index 738cb36..19ac09a 100644 --- a/pages/contracts/openEditionMinter/query.tsx +++ b/pages/contracts/openEditionMinter/query.tsx @@ -63,7 +63,7 @@ const OpenEditionMinterQueryPage: NextPage = () => { onError: (error: any) => { toast.error(error.message, { style: { maxWidth: 'none' } }) }, - enabled: Boolean(contractAddress && contract && wallet.isWalletConnected), + enabled: Boolean(contractAddress && contract), }, ) diff --git a/pages/contracts/royaltyRegistry/query.tsx b/pages/contracts/royaltyRegistry/query.tsx index a1b7416..079fd87 100644 --- a/pages/contracts/royaltyRegistry/query.tsx +++ b/pages/contracts/royaltyRegistry/query.tsx @@ -79,7 +79,7 @@ const RoyaltyRegistryQueryPage: NextPage = () => { onError: (error: any) => { toast.error(error.message, { style: { maxWidth: 'none' } }) }, - enabled: Boolean(contractAddress && contract && wallet.isWalletConnected), + enabled: Boolean(contractAddress && contract), }, ) diff --git a/pages/contracts/sg721/query.tsx b/pages/contracts/sg721/query.tsx index 2357da0..4a57596 100644 --- a/pages/contracts/sg721/query.tsx +++ b/pages/contracts/sg721/query.tsx @@ -75,7 +75,7 @@ const Sg721QueryPage: NextPage = () => { onError: (error: any) => { toast.error(error.message, { style: { maxWidth: 'none' } }) }, - enabled: Boolean(contractAddress && contract && wallet.isWalletConnected), + enabled: Boolean(contractAddress && contract), }, ) diff --git a/pages/contracts/splits/query.tsx b/pages/contracts/splits/query.tsx index 698e8d6..41341cd 100644 --- a/pages/contracts/splits/query.tsx +++ b/pages/contracts/splits/query.tsx @@ -89,7 +89,7 @@ const SplitsQueryPage: NextPage = () => { onError: (error: any) => { toast.error(error.message, { style: { maxWidth: 'none' } }) }, - enabled: Boolean(contractAddress && contract && wallet.isWalletConnected), + enabled: Boolean(contractAddress && contract), }, ) diff --git a/pages/contracts/vendingMinter/query.tsx b/pages/contracts/vendingMinter/query.tsx index 1d564a2..2b42592 100644 --- a/pages/contracts/vendingMinter/query.tsx +++ b/pages/contracts/vendingMinter/query.tsx @@ -63,7 +63,7 @@ const VendingMinterQueryPage: NextPage = () => { onError: (error: any) => { toast.error(error.message, { style: { maxWidth: 'none' } }) }, - enabled: Boolean(contractAddress && contract && wallet.isWalletConnected), + enabled: Boolean(contractAddress && contract), }, ) diff --git a/pages/contracts/whitelist/query.tsx b/pages/contracts/whitelist/query.tsx index b4bf9b0..3e847c3 100644 --- a/pages/contracts/whitelist/query.tsx +++ b/pages/contracts/whitelist/query.tsx @@ -65,7 +65,7 @@ const WhitelistQueryPage: NextPage = () => { onError: (error: any) => { toast.error(error.message, { style: { maxWidth: 'none' } }) }, - enabled: Boolean(contractAddress && contract && wallet.isWalletConnected), + enabled: Boolean(contractAddress && contract), }, )