Skip to content

Commit 2feb7e3

Browse files
authored
fix: fetchPermitInfo restore command line arguments (#941)
1 parent c722609 commit 2feb7e3

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
import path from "path"
1+
import path from 'path'
22
import { argv, chdir, exit } from 'node:process'
33

44
import { SupportedChainId } from '@cowprotocol/cow-sdk'
5-
import { fetchPermitInfo } from "./fetchPermitInfo"
5+
import { fetchPermitInfo } from './fetchPermitInfo'
66

77
function fetchPermitInfoByChain() {
8-
const [, scriptPath, chainId, forceRecheck] = argv
9-
10-
if (!chainId) {
11-
console.error('ChainId is missing. Invoke the script with the chainId as the first parameter.')
12-
exit(1)
13-
}
14-
15-
// Change to script dir so relative paths work properly
16-
chdir(path.dirname(scriptPath))
17-
18-
// Execute the script
19-
fetchPermitInfo({
20-
chainId: +chainId as SupportedChainId,
21-
tokenListPath: undefined,
22-
rpcUrl: undefined,
23-
recheckUnsupported: false,
24-
forceRecheck: forceRecheck === 'true',
25-
}).then(() => console.info(`Done 🏁`))
8+
const [, scriptPath, chainId, tokenListPath, rpcUrl, recheckUnsupported, forceRecheck] = argv
9+
10+
if (!chainId) {
11+
console.error('ChainId is missing. Invoke the script with the chainId as the first parameter.')
12+
exit(1)
2613
}
27-
28-
fetchPermitInfoByChain()
14+
15+
// Change to script dir so relative paths work properly
16+
chdir(path.dirname(scriptPath))
17+
18+
// Execute the script
19+
fetchPermitInfo({
20+
chainId: +chainId as SupportedChainId,
21+
tokenListPath,
22+
rpcUrl,
23+
recheckUnsupported: recheckUnsupported === 'true',
24+
forceRecheck: forceRecheck === 'true',
25+
}).then(() => console.info(`Done 🏁`))
26+
}
27+
28+
fetchPermitInfoByChain()

0 commit comments

Comments
 (0)