-
Notifications
You must be signed in to change notification settings - Fork 28
Feat/add avalanche polygon #921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
29d6db8
6be2e73
b0c4487
742b7ae
3881986
80d6911
8e4c406
ea82d35
ac19de0
3e8cc09
79ee878
eef7c88
ea7b683
38746f1
1730fd1
aaad1c0
5aed520
bb6b13c
d94d390
399345e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,21 @@ | ||
| node_modules | ||
| build | ||
|
|
||
| # MacOS | ||
| .DS_Store | ||
|
|
||
| # Intellij | ||
| .idea | ||
|
|
||
| # Vscode | ||
| .vscode | ||
|
|
||
| # yalc | ||
| .yalc | ||
| yalc.lock | ||
| src/cowFi/TEMP* | ||
|
|
||
| # Temporary files | ||
| src/cowFi/TEMP* | ||
|
|
||
| # logs | ||
| *.log |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done some refactor |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import path from 'path' | ||
| import { argv, chdir } from 'node:process' | ||
|
|
||
| import { SupportedChainId } from '@cowprotocol/cow-sdk' | ||
| import { fetchPermitInfo } from './fetchPermitInfo' | ||
|
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| async function fetchAllPermitInfo() { | ||
| const [, scriptPath] = argv | ||
|
|
||
| chdir(path.dirname(scriptPath)) | ||
|
|
||
|
Comment on lines
+8
to
+12
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider preserving the original working directory. The script changes the working directory but doesn't restore it after execution, which could affect subsequent operations. async function fetchAllPermitInfo() {
const [, scriptPath] = argv
+ const originalDir = process.cwd()
chdir(path.dirname(scriptPath))
+
+ try {
🤖 Prompt for AI Agents |
||
| for (const chainId in SupportedChainId) { | ||
| if (!isNaN(Number(chainId))) { | ||
| await fetchPermitInfo({ | ||
| chainId: chainId as unknown as SupportedChainId, | ||
| tokenListPath: undefined, | ||
| rpcUrl: undefined, | ||
| recheckUnsupported: false, | ||
| forceRecheck: false, | ||
| }) | ||
| } | ||
| } | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| fetchAllPermitInfo() | ||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why the choice of winston?
Or why the need for a dedicated logging lib.
Anyway, we use pino logger in other nodejs apps (watch tower, bff), but you probably have not dealt with them yet to know this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kind of well used library, I can change it to pino logger if needed