-
Notifications
You must be signed in to change notification settings - Fork 1
Verify token kind uniqueness #30
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
base: main
Are you sure you want to change the base?
Conversation
We use token kind to identify tokens in the price feed. This makes sure there aren't any duplicates without going too deep into refactoring that.
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.
Pull Request Overview
This PR implements validation to ensure token kind uniqueness in the token configuration to prevent duplicates that could cause issues in the price feed identification system.
- Modifies config resolution functions to return
Result<ServerConfig>instead ofServerConfigto handle validation errors - Adds a new validation function
check_token_configthat verifies no duplicate token kinds exist - Updates main function and test to handle the new error-returning configuration resolution
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/shielder-relayer/src/main.rs | Updates main function to handle error from config resolution |
| crates/shielder-relayer/src/config/tests.rs | Modifies test to handle and return Result from config resolution |
| crates/shielder-relayer/src/config/mod.rs | Adds token kind uniqueness validation and updates config functions to return Results |
| README.md | Formats license list items using markdown bullet points |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
We use token kind to identify tokens in the price feed. This makes sure there aren't any duplicates without going too deep into refactoring that.