From b80b72f2104a1c6584bf770fed6ad25af3c8b9da Mon Sep 17 00:00:00 2001 From: karooolis Date: Wed, 22 Jan 2025 13:46:03 +0200 Subject: [PATCH] enable useWatchBlocks if shovel api is failing --- .../worlds/[worldAddress]/observe/TransactionsWatcher.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/TransactionsWatcher.tsx b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/TransactionsWatcher.tsx index b2e791d363..6c12bdaaa3 100644 --- a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/TransactionsWatcher.tsx +++ b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/TransactionsWatcher.tsx @@ -32,7 +32,7 @@ export function TransactionsWatcher() { const wagmiConfig = useConfig(); const { data: worldAbiData } = useWorldAbiQuery(); const abi = worldAbiData?.abi; - const { data: blocks } = useBlocksQuery(); + const { data: blocks, error: blocksError } = useBlocksQuery(); const { transactions, setTransaction, updateTransaction } = useStore(worldStore); const observerWrites = useStore(observerStore, (state) => state.writes); @@ -251,7 +251,7 @@ export function TransactionsWatcher() { handleTransaction({ hash, timestamp: block.timestamp }); } }, - enabled: indexer.type === "sqlite", + enabled: indexer.type === "sqlite" || !!blocksError, }); return null;