Skip to content

bug: swap claim waits keep polling after a wallet wipe #1926

Closed

Description

@ovitrif

A swap claim wait running when the wallet is wiped keeps polling, and then starts a new background loop.

Why

  • PubkySwapsRouteRepo.resetForWipe cancels the background advancing loops and ends the restore, but not the awaitClaim jobs on the repo scope, started by the send flow and by the restore collector (WalletViewModel.kt).
  • After the wipe the keychain is empty, so each advance fails with MnemonicNotFound; pollClaim retries it every 2 s for the rest of the 10-minute wait.
  • When the wait ends, awaitClaimOnce calls advanceInBackground, which adds a fresh loop that polls every 30 s until a new wallet has a mnemonic.

No funds are at risk: wasted work and log noise. The swap route is behind the debug-only PUBKY_SWAPS_ROUTES flag.

Fix

Have resetForWipe cancel the running claim waits too, or skip advanceInBackground once the wallet was wiped since the wait started.

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