From afaa0bfdb745022cf9a4a7e4cc2d9667517ddc8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Tkaczy=C5=84ski?= Date: Wed, 7 Aug 2024 22:12:26 +0200 Subject: [PATCH] fix: read execution_strategy from event directly (#556) * fix: read execution_strategy from event directly It's stored directly in the event, not under proposal. * chore: bring back .reset() --- apps/api/src/index.ts | 2 +- apps/api/src/writer.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index d1bbf2655..170f04eac 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -65,7 +65,7 @@ async function run() { await sleep(PRODUCTION_INDEXER_DELAY); } - // await checkpoint.reset(); + await checkpoint.reset(); checkpoint.start(); } diff --git a/apps/api/src/writer.ts b/apps/api/src/writer.ts index b2232b8a0..9f9fac45c 100644 --- a/apps/api/src/writer.ts +++ b/apps/api/src/writer.ts @@ -565,16 +565,14 @@ export const handleUpdate: starknet.Writer = async ({ console.log('failed to update proposal metadata', e); } - /* const executionStrategy = await handleExecutionStrategy( - event.proposal.execution_strategy, + event.execution_strategy, event.payload ); if (executionStrategy) { proposal.execution_strategy_type = executionStrategy.executionStrategyType; proposal.quorum = executionStrategy.quorum; } - */ await proposal.save(); };