From 94133852965bb00d6a82dd9863ae8fac3f2067b1 Mon Sep 17 00:00:00 2001 From: jbamlee Date: Tue, 31 Oct 2023 08:35:47 +0900 Subject: [PATCH] fix: optional chaining to filter only Terraswap --- src/collector/indexer/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collector/indexer/index.ts b/src/collector/indexer/index.ts index 29eb63e..8b2ea76 100644 --- a/src/collector/indexer/index.ts +++ b/src/collector/indexer/index.ts @@ -51,7 +51,7 @@ export async function runIndexers( if (spwfLogFounds.length > 0) { // initial provide - if (spwfLogFounds.find((logFound) => logFound.transformed.action === 'provide_liquidity')) { + if (spwfLogFounds.find((logFound) => logFound.transformed?.action === 'provide_liquidity')) { const ipLogFounds = createInitialProvideFinder(pairList)(event).filter(ip=> ip.transformed) await InitialProvideIndexer(manager, ipLogFounds) }