Skip to content

Commit

Permalink
enable useWatchBlocks if shovel api is failing
Browse files Browse the repository at this point in the history
  • Loading branch information
karooolis committed Jan 22, 2025
1 parent 53bdb13 commit b80b72f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -251,7 +251,7 @@ export function TransactionsWatcher() {
handleTransaction({ hash, timestamp: block.timestamp });
}
},
enabled: indexer.type === "sqlite",
enabled: indexer.type === "sqlite" || !!blocksError,
});

return null;
Expand Down

0 comments on commit b80b72f

Please sign in to comment.