Skip to content

bug: later restore passes re-poll swaps this session committed #1928

Closed

Description

@ovitrif

A restore pass later in the session can track and poll again a swap the send flow already committed or dropped.

Why

  • Since fix: pubky swaps route follow-ups #1923 the restore runs for the whole session: it restores again on each contact change and retries incomplete providers.
  • bitkit-core v0.8.0-rc15 reports every listed swap that already has a store record as known, finished or not. A provider asked after the user committed a swap through it in the same session (earlier attempts failed, its list was incomplete, or it became a contact during the retry delays) returns that swap as known.
  • restoreSwaps calls track(restored + known), so a swap dropFailedSwap untracked after its hold failed is tracked again. WalletViewModel then launches awaitClaim on it with no hold-failure watch: it polls every 2 s for 10 minutes, then in the background until bitkit-core's timeout height (about a day on mainnet), and each node start resumes it.
  • A swap still in flight gets a second claim wait beside the send flow's, and the first to finish removes it from claiming.

No funds are at risk: wasted polling, as in #1926 and #1927. The swap route is behind the debug-only PUBKY_SWAPS_ROUTES flag.

Fix

Skip the swap ids this session committed or dropped, or track and await only restored swaps.

Found in review of #1923: #1923 (comment)

Activity

  1. added this to the 3.3.0 milestone on Nov 14, 2026
  2. self-assigned this
    on Nov 14, 2026
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