Skip to content

Simplify session id pj cli#999

Merged
arminsabouri merged 2 commits into
payjoin:masterfrom
arminsabouri:simplify-session-id-pj-cli
Aug 27, 2025
Merged

Simplify session id pj cli#999
arminsabouri merged 2 commits into
payjoin:masterfrom
arminsabouri:simplify-session-id-pj-cli

Conversation

@arminsabouri

@arminsabouri arminsabouri commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

Both sender and receiver use the same i64 row id as their "session id". There is really no need for an enum representation.

Pull Request Checklist

Please confirm the following before requesting review:

  • A human has reviewed every single line of this code before opening the PR (no auto-generated, unreviewed LLM/robot submissions).
  • I have read CONTRIBUTING.md and rebased my branch to produce hygienic commits.

Both sender and receiver use the same i64 row id as their "session id".
There is really no need for an enum representation.
@DanGould

Copy link
Copy Markdown
Member

Is there any chance the same database could be sending a payjoin to itself and clash on the same ID?

@arminsabouri

Copy link
Copy Markdown
Contributor Author

Is there any chance the same database could be sending a payjoin to itself and clash on the same ID?

No, because sender and receiver have different sessions tables with different auto-incrementing ids.

@arminsabouri

Copy link
Copy Markdown
Contributor Author

@DanGould the enum was an artifact of when both sender and receiver shared a sessions table
#873 (comment)

@DanGould DanGould left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

concept ACK

@DanGould

DanGould commented Aug 27, 2025

Copy link
Copy Markdown
Member

i find the visibility change odd bc payjoin-cli is not anyone's library dependency, but it's not a problem either.

edit: on second thought minimum visibility makes sense

@arminsabouri
arminsabouri merged commit 2dbbd5e into payjoin:master Aug 27, 2025
19 of 20 checks passed
@arminsabouri
arminsabouri deleted the simplify-session-id-pj-cli branch August 27, 2025 15:15
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