Skip to content

Commit

Permalink
set gateway url only when not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut committed Dec 9, 2024
1 parent 8552468 commit c178c2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion squid/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const fields = {
}

const processor = new SubstrateBatchProcessor()
.setGateway(env.gatewayUrl)
.setRpcEndpoint({ url: env.rpcWs, maxBatchCallSize: 1 })
.setBlockRange({
from: Number(env.blockstart)
Expand All @@ -71,6 +70,8 @@ const processor = new SubstrateBatchProcessor()
name: supportedEvents
})

!!env.gatewayUrl && processor.setGateway(env.gatewayUrl)

export type Ctx = DataHandlerContext<Store, typeof fields>

processor.run(
Expand Down

0 comments on commit c178c2d

Please sign in to comment.