-
Notifications
You must be signed in to change notification settings - Fork 34
fix/fix_stream_prices_example_script #372
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
Conversation
…always in lowercase
WalkthroughThe update modifies the handling of the Changes
Sequence Diagram(s)sequenceDiagram
participant Main as main()
participant Market as market
participant Client as client.listen_oracle_prices_updates
Main->>Market: Retrieve oracle_type
Market-->>Main: Return oracle_type
Main->>Main: Convert oracle_type to lowercase
Main->>Client: Pass processed oracle_type to listen_oracle_prices_updates
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
examples/exchange_client/oracle_rpc/1_StreamPrices.py (1)
32-32
: Consider adding validation and documentation.To improve robustness and maintainability:
- Add validation to handle potential None values
- Document why lowercase is required
+ # Oracle type must be lowercase for the API + if market.oracle_type is None: + raise ValueError("Oracle type is required") oracle_type = market.oracle_type.lower()
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
examples/exchange_client/oracle_rpc/1_StreamPrices.py
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: run-tests (3.11, windows-latest)
- GitHub Check: run-tests (3.10, windows-latest)
- GitHub Check: run-tests (3.9, windows-latest)
🔇 Additional comments (1)
examples/exchange_client/oracle_rpc/1_StreamPrices.py (1)
32-32
: LGTM! Change aligns with PR objective.The conversion of oracle_type to lowercase ensures consistent format for the API call.
Summary by CodeRabbit