Skip to content

feat: retry the swap restore for missed providers #1829

Open

Description

@ovitrif

Follow-up from #1732 (Pubky Swaps routes, behind PUBKY_SWAPS_ROUTES on regtest debug builds).

The swap restore after a wallet restore asks each candidate provider once and never again:

  • restoreSwaps reads its candidates from the contacts loaded when the backup restore completes. After a deferred Pubky session restore (retryDeferredSessionRestoration) that list can be empty, so nothing is found.
  • bitkit-core reports providers whose swap list was not read in full as incompleteProviders and says to restore again for them; the app only logs them.
  • bitkit-core asks at most 30 candidates for a route or a restore (MAX_CANDIDATES in feat: pubky swaps as paykit route bitkit-core#182). Configured providers come first, but contacts arrive alphabetically, so a provider sorting after the 30th contact is never tried.

Funds are not lost meanwhile: an unclaimed hold invoice expires back to Spending, and the provider refunds its own lock at the timeout.

Review threads:

Activity

  1. added this to the 3.3.0 milestone on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions