-
Notifications
You must be signed in to change notification settings - Fork 60
fix(core): fix cosmos signing issue #603
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
WalkthroughThis change adds two module-level lists for required and optional keys in a Cosmos transaction. It updates the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Transaction
participant MessageArgs
Caller->>Transaction: deserialize(raw_message)
Transaction->>Transaction: Parse JSON payload
Transaction->>Transaction: Check for each key in required_keys
Transaction->>MessageArgs: Construct with explicit arguments from JSON
Transaction-->>Caller: Return Transaction instance
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Pylint (3.3.7)core/src/apps/cosmos/transaction.py✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
CodeRabbit Configuration File (
|
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
core/src/apps/cosmos/transaction.py(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
core/src/apps/cosmos/transaction.py (1)
crypto/tests/test_wycheproof.py (1)
DataError(56-57)
🪛 Ruff (0.11.9)
core/src/apps/cosmos/transaction.py
230-230: Avoid specifying long messages outside the exception class
(TRY003)
239-239: Trailing comma missing
Add trailing comma
(COM812)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Style check
- GitHub Check: Defs check
- GitHub Check: Gen check
- GitHub Check: Analyze (python)
🔇 Additional comments (3)
core/src/apps/cosmos/transaction.py (3)
11-12: Good centralization of key definitions.This improves maintainability by defining keys in one place. The separation between required and optional keys is clear.
15-15: Consistent with the new key management approach.Using
required_keysmaintains consistency and reduces duplication.
229-230: Improved validation using centralized key list.This change makes the required key validation more maintainable and consistent.
🧰 Tools
🪛 Ruff (0.11.9)
230-230: Avoid specifying long messages outside the exception class
(TRY003)
Summary by CodeRabbit