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: replaced send sheet keeps its swap contact #1930
A swap send's hold payment failing after its Send sheet was replaced by another sheet puts the swap's contact back on the send state, with no Send sheet open.
Why
fix: pubky swaps route review follow-ups #1929 bumps sendSession in hideSheet, so a closed send no longer gets its contact back. showSheet can also close an open Send sheet: it sets _currentSheet to null, then to the new sheet, without going through hideSheet. SheetHost calls onDismiss only when the dismissed key matches the current one, so a programmatic swap never reaches hideSheet.
Two callers do this while a Send sheet can be open:
handleChannelClosed shows Sheet.ConnectionClosed on a counterparty close.
ContentView opens sheet deep links.
A counterparty close while a swap's hold HTLC is in flight is a natural way for that hold to fail later. Then releaseFailedSwapHold or restoreSwapContact passes the session check and sets activeContactPaymentContext with no Send sheet open, the bug: closed swap send gets its contact back after hold failure #1925 symptom.
The swap route is behind the debug-only PUBKY_SWAPS_ROUTES flag.
Fix
Bump the send session wherever an open Sheet.Send is replaced, in a small helper both hideSheet and showSheet call. Add a test like swap route hold failing after its sheet closed leaves no contact behind, with showSheet(Sheet.ConnectionClosed) in place of hideSheet().
Activity
[-]fix: replaced send sheet keeps its swap contact[/-][+]bug: replaced send sheet keeps its swap contact[/+]