-
Notifications
You must be signed in to change notification settings - Fork 173
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
fix(libp2p): fix typed data from model #2357
Conversation
Ohayo, sensei! Here’s the updated structured summary of the changes: WalkthroughThe changes introduce new entries in the Changes
Sequence Diagram(s)sequenceDiagram
participant A as Client
participant B as TypedData
participant C as Model
A->>B: Request TypedData
B->>C: Retrieve model.name
C-->>B: Return model.name
B->>B: Add ("model", model.name as PrimitiveType::String) to values
B->>B: Add ("model", SimpleField of type "shortstring") to types
B-->>A: Return TypedData with updated values and types
sequenceDiagram
participant D as Database
participant E as Relay
participant F as Message
E->>D: Validate Message with TypedData
D->>E: Check primary_type in TypedData
E->>F: Parse message using PrimitiveType::Object
F-->>E: Return parsed message
E-->>D: Return validation result
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Additional comments not posted (4)
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.
Good cleanup. 👍
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2357 +/- ##
==========================================
- Coverage 67.51% 67.48% -0.04%
==========================================
Files 359 359
Lines 46955 46933 -22
==========================================
- Hits 31704 31671 -33
- Misses 15251 15262 +11 ☔ View full report in Codecov by Sentry. |
Summary by CodeRabbit
TypedData
functionality by including the model's name in both the values and types maps, improving data representation and processing capabilities.validate_message
function to accept a more structuredTypedData
input, streamlining message parsing and error handling.validate_message
function for clearer context in error reporting.TypedData
initialization in tests by consolidating entries and focusing on relevant fields.