Skip to content

Commit

Permalink
fix: don't ping chainhook node if auto predicate reg is disabled (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr authored Jun 30, 2023
1 parent 3fd969f commit f04445e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chainhook/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ export async function buildChainhookServer(args: { db: PgStore }) {
}).withTypeProvider<TypeBoxTypeProvider>();

fastify.decorate('db', args.db);
fastify.addHook('onReady', waitForChainhookNode);
if (ENV.CHAINHOOK_AUTO_PREDICATE_REGISTRATION) {
fastify.addHook('onReady', waitForChainhookNode);
fastify.addHook('onReady', registerChainhookPredicates);
fastify.addHook('onClose', removeChainhookPredicates);
}
Expand Down

0 comments on commit f04445e

Please sign in to comment.