-
Notifications
You must be signed in to change notification settings - Fork 3
feat: session emit event #232
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
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 adds session event emission functionality to the signing client. It introduces the ability to emit custom events through the session and also includes reject event handling for proposal responses.
- Added
emit
method to send custom events through session connections - Added
request
method for session requests with proper error handling - Enhanced session event handling with proper event data parsing and emission
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
crates/yttrium/src/uniffi_compat/sign/mapper.rs | Added conversion logic from FFI types to internal session request types and updated JSON parsing to use string values |
crates/yttrium/src/uniffi_compat/sign/client.rs | Added emit and request methods to the FFI client wrapper with enhanced event listener interface |
crates/yttrium/src/sign/tests.rs | Updated test assertions to match new SessionConnect event signature |
crates/yttrium/src/sign/relay.rs | Modified IncomingSessionMessage enum to support new event structures |
crates/yttrium/src/sign/protocol_types.rs | Added new protocol types for session events and proposal responses |
crates/yttrium/src/sign/incoming.rs | Enhanced event parsing and added session reject handling |
crates/yttrium/src/sign/client_errors.rs | Added EmitError enum for emit operation error handling |
crates/yttrium/src/sign/client.rs | Implemented core emit and request functionality in the sign client |
crates/rust-sample-wallet/src/app.rs | Updated event handlers to match new session event signatures |
crates/kotlin-ffi/android/src/main/kotlin/com/reown/yttrium/uniffi_yttrium.kt | Auto-generated FFI bindings file |
Comments suppressed due to low confidence (1)
crates/yttrium/src/sign/client.rs:1
- The
data.clone()
on line 265 creates an unnecessary copy of the string. Consider usingdata
directly since it's already owned:Err(_) => serde_json::Value::String(data)
.
use {
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.