You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: failed swap hold payment keeps the claim poll running #1920
When a swap-routed send's hold payment fails, the swap's claim poll keeps running for about 70 minutes.
Why
The poll runs in scope.async (PubkySwapsRouteRepo.kt:152, since 490bdb4), so claim.cancel() in awaitSwapClaim (AppViewModel.kt:7450) no longer stops it when the hold payment fails.
The provider never funds a swap whose hold invoice wasn't paid, and bitkit-core reports it as AwaitingLockup until the lockup timeout. So the poll calls pubkySwapsAdvance every 2 s for the 10-minute CLAIM_TIMEOUT. Each call loads the mnemonic and opens a new Electrum connection.
Then the timeout branch starts advanceInBackground, which polls every 30 s for another hour. Each retry of a failing hold payment adds another pair.
Fix
Stop the poll only on a known hold failure, so a cleared screen still leaves the claim running (what 490bdb4 fixed): pass the hold failure into the async, select on it there, and skip advanceInBackground when it wins.
iOS is not affected: its claim.cancel() stops the poll, and awaitClaim starts the background advance only after a claim or a timeout.
Activity