Skip to content

Conversation

@arminsabouri
Copy link
Collaborator

This PR adds session events generated by processing the sender state machine. To enable serialization and deserialization of session events, we implement serde::Serialize and serde::Deserialize on the underlying v1 & v2 types that are captured in session events.

To enable comparisons between SessionEvents during tests, all event types must also implement PartialEq and Eq.

Tests cover roundtrip ser/deserialization of each session event.

@arminsabouri arminsabouri force-pushed the sender-session-events branch from e81f939 to 1d7b49d Compare June 16, 2025 16:58
@coveralls
Copy link
Collaborator

coveralls commented Jun 16, 2025

Pull Request Test Coverage Report for Build 15714751264

Details

  • 39 of 39 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 86.135%

Totals Coverage Status
Change from base Build 15712295271: 0.07%
Covered Lines: 7169
Relevant Lines: 8323

💛 - Coveralls

@arminsabouri arminsabouri requested a review from spacebear21 June 17, 2025 11:00
Copy link
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1d7b49d

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this file be renamed to session.rs as well to mirror receive?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do. Perhaps in a seperate PR?

@arminsabouri arminsabouri force-pushed the sender-session-events branch from 1d7b49d to 7e9ac72 Compare June 17, 2025 17:00
@arminsabouri
Copy link
Collaborator Author

Last push exports to and from json methods for uniffi

This commit adds session events generated by processing the sender
state machine. To enable serialization and deserialization of session events,
we implement `serde::Serialize` and `serde::Deserialize` on the underlying
v1 & v2 types that are captured in session events.

To enable comparisons between `SessionEvents` during tests,
all event types must also implement `PartialEq` and `Eq`.

Tests cover roundtrip ser/deserialization of each session event.

All of our uniffi exports are under the same namespace (see
payjoin_ffi.udl). This commit adds a sender/reciever name prefix to
the exported session event object avoid a naming conflict.

[Related ticket](payjoin#723)
@arminsabouri arminsabouri force-pushed the sender-session-events branch from 79142e8 to 54302e9 Compare June 17, 2025 18:02
@arminsabouri arminsabouri merged commit c98d5bb into payjoin:master Jun 17, 2025
13 checks passed
@arminsabouri arminsabouri deleted the sender-session-events branch June 17, 2025 18:35
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.

3 participants