Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #506 from api3dao/abt-579-fix-config-parsing
Browse files Browse the repository at this point in the history
Fix config parsing temporarily
  • Loading branch information
aquarat authored Jan 30, 2024
2 parents 0094578 + 7eeaa33 commit 6cf957e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ type Secrets = Record<string, string | undefined>;

export const loadConfig = (configPath: string, secrets: Record<string, string | undefined>) => {
const rawConfig = readConfig(configPath);

// Hack to deal with missing fulfilment limits without bumping dependencies
// @ts-ignore
// eslint-disable-next-line functional/immutable-data
rawConfig.chains = Object.fromEntries(
// @ts-ignore
Object.entries(rawConfig.chains).map(([chainId, chainData]) => [
chainId,
{
// @ts-ignore
...chainData,
// @ts-ignore
options: { ...chainData.options, fulfillmentGasLimit: 1000000 },
},
])
);

const parsedConfigRes = parseConfigWithSecrets(rawConfig, secrets);
if (!parsedConfigRes.success) {
throw new Error(`Invalid Airseeker configuration file: ${parsedConfigRes.error}`);
Expand Down

0 comments on commit 6cf957e

Please sign in to comment.