Skip to content

Commit

Permalink
fix null pointer access
Browse files Browse the repository at this point in the history
  • Loading branch information
ironoa committed Oct 28, 2024
1 parent bd0c76c commit 1531705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transfers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 1531705

Please sign in to comment.