Skip to content

bug: retried swap send loses its contact #1837

Closed

Description

@ovitrif

When a swap's hold payment fails and the user retries from Amount, the retried payment loses its contact.

Cause

Moving to Pending clears activeContactPaymentContext, and the failure deletes the pending contact context. Retry from Amount restores neither, so the retry runs with a null context:

  • No pending contact context is stored for the new hold payment.
  • consumePrivatePaymentListIfNeeded(null) consumes nothing, although the first attempt's entry was released.
  • On settlement, syncContactForActivity tags the activity with no contact. If another contact send is open by then, it tags that contact instead.

Master's pending Lightning retry has the same gap.

Fix

Restore the contact context when the current send's hold payment fails. Add a test that drives Error, Retry, Continue and confirm for a swap.

Found in review of #1732:

Activity

  1. added this to the 3.3.0 milestone on Nov 10, 2026
  2. self-assigned this
    on Nov 14, 2026
  3. modified the milestones: 3.3.0, 3.2.0 on Nov 26, 2026
  4. ovitrif commented on Nov 26, 2026

    @ovitrif
    CollaboratorAuthor

    Moved to milestone 3.2.0: the fix, #1923, is on master, so it ships in 3.2.0.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions