Skip to content

Commit

Permalink
Get chainId in real time instead of using constant since it could cha…
Browse files Browse the repository at this point in the history
…nge if newly created.
  • Loading branch information
NoahSaso committed Sep 30, 2023
1 parent 62b672e commit a224db0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/export/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const main = async () => {
})

// Initialize state.
const state = await State.createSingletonIfMissing()
await State.createSingletonIfMissing()

// Create CosmWasm client that batches requests.
const httpClient = new HttpBatchClient(config.rpc)
Expand Down Expand Up @@ -101,7 +101,7 @@ const main = async () => {
script: 'export',
},
extra: {
chainId: state.chainId,
chainId: (await State.getSingleton())?.chainId ?? 'unknown',
trace,
blockHeight,
},
Expand Down

0 comments on commit a224db0

Please sign in to comment.