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: early or post-restart hold failures keep the swap polled #1927
Two hold failures still leave a swap saved in unfinishedPubkySwaps, so it's advanced every 30 s on each node start until bitkit-core reports it failed (about 144 blocks).
Why
Hold fails before payInvoice returns:proceedWithSwapRoutedPayment (AppViewModel.kt) skips pendingPaymentRepo.track, so the failure event never reaches releaseFailedSwapHold. The LightningPaymentFailedError branch of finishSwapRoutedPayment only clears swapIdsByHoldHash. On Main.immediate, the async in awaitSwapClaim that would call awaitClaim is cancelled before it starts, so the repo never sees the failure either.
Hold fails after an app restart:swapIdsByHoldHash lives only in memory, so a resumed swap whose hold then fails is never dropped.
No funds are at risk: each advance loads the mnemonic and opens an Electrum connection. The swap route is behind the debug-only PUBKY_SWAPS_ROUTES flag.
Fix
Call dropFailedSwap in the LightningPaymentFailedError branch of finishSwapRoutedPayment.
Persist the hold hash with the unfinished swap, so a hold failure after a restart drops it.
Activity