Skip to content

Conversation

jakubuid
Copy link
Collaborator

No description provided.

Copy link
Contributor

@Copilot Copilot AI left a 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 using data 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.

@jakubuid jakubuid requested a review from chris13524 September 23, 2025 09:51
@jakubuid jakubuid merged commit 25de132 into push-yruotstkupns Sep 24, 2025
7 of 9 checks passed
@jakubuid jakubuid deleted the session_emit branch September 24, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants