Skip to content
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

[SWA-134][IMPROVEMENT] - Fix CoW Trade type errors #335

Merged

Conversation

ElRodrigote
Copy link
Collaborator

Fixes: SWA-134

Description

  • Install Prettier and the ESLint plugin to run the linter through the codebase.
  • Update CoW SDK trade new types, remove unneeded ESLint skips

Comment on lines 27 to 33
enum CowChainId {
MAINNET = 1,
RINKEBY = 4,
GOERLI = 5,
GNOSIS = 100,
SEPOLIA = 11155111,
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to import this values?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Already did it! Also added Sepolia to our ChainID constant

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I was to vague. Import this values from cow-sdk. They must have their own ChaindId on the SDK

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we talked offline:
We will keep the current version of the code as CoW SDK provides a ChainID enum that lacks some of the chain IDs needed for this use case.

@ElRodrigote ElRodrigote merged commit 154a77a into develop Jan 17, 2024
1 check failed
@ElRodrigote ElRodrigote deleted the improvement/swa-134-swapr-sdk-fix-cowtrade-type-errors branch February 1, 2024 13:17
berteotti pushed a commit that referenced this pull request Feb 1, 2024
* improv(SWA-134): install prettier and run the linter with fixes
* improv(SWA-134): ran linter in new Swapr V3 files, change import path from ethers to enable treeshaking
* improv(SWA-134): remove unneeded linter disables, update imports, update CoW SDK types
* chore(SWA-134): PR comment to abstract numbers into ChainId
ElRodrigote added a commit that referenced this pull request Feb 1, 2024
* improv(SWA-134): install prettier and run the linter with fixes
* improv(SWA-134): ran linter in new Swapr V3 files, change import path from ethers to enable treeshaking
* improv(SWA-134): remove unneeded linter disables, update imports, update CoW SDK types
* chore(SWA-134): PR comment to abstract numbers into ChainId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants