Skip to content

Conversation

@arminsabouri
Copy link
Collaborator

Foreign languages should have access to the send session status after replayling the session event log.

Pull Request Checklist

Please confirm the following before requesting review:

/// event log.
#[derive(uniffi::Object)]
pub struct SenderSessionStatus {
inner: payjoin::send::v2::SessionStatus,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is inner idiomatic? or should it just be pub struct SenderSessionStatus(payjoin::send::v2::SessionStatus)

Copy link
Collaborator

Choose a reason for hiding this comment

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

There doesn't seem to be a perfectly consistent approach that we take, SenderSessionEvent has a tuple struct while SenderSessionOutcome has named fields, this seems fine imo

Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer tuple struct where there's only one inner value, but we can make this consistent in a follow-up.

@coveralls
Copy link
Collaborator

coveralls commented Oct 2, 2025

Pull Request Test Coverage Report for Build 18224907273

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.237%

Totals Coverage Status
Change from base Build 18224113546: 0.0%
Covered Lines: 8962
Relevant Lines: 10639

💛 - Coveralls

@arminsabouri arminsabouri changed the title Expose sender status off ffi session history Expose missing sender session history FFI methods Oct 3, 2025
Copy link
Collaborator

@benalleng benalleng left a comment

Choose a reason for hiding this comment

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

ack, the different SenderSession Structs in the ffi already accept a variety of tuple vs named fields, it seems fine for this to be this way unless we want to definitively settle on one or the other.

Foreign languages should have access to the send session status after
replayling the session event log.
Make PjParam accessible to foreign languages.
@arminsabouri arminsabouri force-pushed the missing-sender-session-history-methods branch from d94c1a0 to 3531394 Compare October 3, 2025 14:19
@arminsabouri arminsabouri requested a review from benalleng October 3, 2025 14:56
@arminsabouri
Copy link
Collaborator Author

ack, the different SenderSession Structs in the ffi already accept a variety of tuple vs named fields, it seems fine for this to be this way unless we want to definitively settle on one or the other.

You are right. The other exports just wrap around the rust-payjoin type. I think thats better bc the foreign language won't have some class with a inner field.

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, receive needs the same treatment (I'll open a PR).

@spacebear21 spacebear21 merged commit 5335134 into payjoin:master Oct 3, 2025
14 checks passed
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.

4 participants