From 15317056ead6f921a41d1dc164079763ecee3e5b Mon Sep 17 00:00:00 2001 From: Alessio Onori Date: Mon, 28 Oct 2024 17:40:58 +0100 Subject: [PATCH] fix null pointer access --- src/transfers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transfers.ts b/src/transfers.ts index 9321fc1..fee5d39 100644 --- a/src/transfers.ts +++ b/src/transfers.ts @@ -109,8 +109,8 @@ function extractTransferInfoFromXcmEvent(event: XcmSentEvent, chainInfo: ChainIn } function getLocation(location: StagingXcmV4Location, chainInfo: ChainInfo, blockNumber: number): string { - if (!(location.interior.isX1)) { - log.error(`XCM. Junctions not supported: ${location.interior.type}. Block ${blockNumber}`) + if (!(location?.interior.isX1)) { + log.error(`XCM. Junctions not supported: ${location?.interior.type}. Block ${blockNumber}`) return 'Unknown' } const x1 = location.interior.asX1[0]