Skip to content

SessionHistory should always have one element #1046

Closed

Description

@arminsabouri

Several public session history methods currently mistakenly return Option<T> because replaying a SEL with no events is valid, leaving the session in an Uninitialized state. PR #1014 removes the Uninitialized variant and enforces that every SEL must contain at least one event. After we remove the Unintialized state, we can remove the optional return type of session history methods that read from the first event. e.g fallback_tx and pj_param for the sender and session_context() & pj_uri() for the receiver.

Activity

  1. added this to the payjoin-1.0 milestone on Sep 5, 2025
  2. 0xZaddyy commented on Sep 8, 2025

    @0xZaddyy
    Contributor

    Hi @arminsabouri
    i'm working on this already

  3. arminsabouri commented on Sep 8, 2025

    @arminsabouri
    ContributorAuthor

    Hi @arminsabouri i'm working on this already

    Thank you for picking this up. Just a heads up. I'd like to get #1014 in first. So please try to either build on top of those commits or rebase when we finish revewing and merging that work.

  4. 0xZaddyy commented on Sep 9, 2025

    @0xZaddyy
    Contributor

    Alright then!

  5. arminsabouri commented on Sep 11, 2025

    @arminsabouri
    ContributorAuthor

    Reopening. There are follow up items from the PR above #1055 (review)

  6. arminsabouri commented on Sep 11, 2025

    @arminsabouri
    ContributorAuthor

    Closed by #1062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apireceivereceiving payjoinsendsending payjoin

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions