Skip to content

Commit b80b72f

Browse files
committed
enable useWatchBlocks if shovel api is failing
1 parent 53bdb13 commit b80b72f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/TransactionsWatcher.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function TransactionsWatcher() {
3232
const wagmiConfig = useConfig();
3333
const { data: worldAbiData } = useWorldAbiQuery();
3434
const abi = worldAbiData?.abi;
35-
const { data: blocks } = useBlocksQuery();
35+
const { data: blocks, error: blocksError } = useBlocksQuery();
3636
const { transactions, setTransaction, updateTransaction } = useStore(worldStore);
3737
const observerWrites = useStore(observerStore, (state) => state.writes);
3838

@@ -251,7 +251,7 @@ export function TransactionsWatcher() {
251251
handleTransaction({ hash, timestamp: block.timestamp });
252252
}
253253
},
254-
enabled: indexer.type === "sqlite",
254+
enabled: indexer.type === "sqlite" || !!blocksError,
255255
});
256256

257257
return null;

0 commit comments

Comments
 (0)