feat(send): improve Lightning send failure recovery - #652
Conversation
896e0dd to
e9c58c5
Compare
Greptile SummaryThe PR moves Lightning failures into a dedicated retry flow, resets routing caches before retrying, and adds localized failure messages.
Confidence Score: 4/5The PR is not yet safe to merge because a failed Lightning stop can leave the wallet permanently stuck in the stopping lifecycle state. The recovery path calls Files Needing Attention: Bitkit/Views/Wallets/Send/SendFailure.swift; Bitkit/ViewModels/WalletViewModel.swift
|
| Filename | Overview |
|---|---|
| Bitkit/Views/Wallets/Send/SendFailure.swift | Implements cache-reset and node-restart recovery, but a stop failure can leave the lifecycle stuck in .stopping. |
| Bitkit/ViewModels/WalletViewModel.swift | Adds routing-cache reset and freshness polling while retaining a lifecycle state that the retry restart cannot recover. |
| Bitkit/Views/Wallets/Send/SendSheet.swift | Adds retry-route metadata and restores the corresponding confirmation flow. |
| Bitkit/Extensions/PaymentFailureReason+UserMessage.swift | Centralizes generic and send-specific localized payment-failure mappings. |
Reviews (2): Last reviewed commit: "feat(send): improve Lightning send failu..." | Re-trigger Greptile
0605e65 to
0949bb0
Compare
0949bb0 to
68877e8
Compare
| cacheResetError = error | ||
| } | ||
|
|
||
| try await wallet.start() |
There was a problem hiding this comment.
Failed stop blocks node restart
When lightningService.stop() throws during the routing-cache reset, the lifecycle state remains .stopping, so this call to wallet.start() returns without restarting the node. The retry then aborts and subsequent starts are also skipped, leaving Lightning operations unavailable until another lifecycle reset occurs.
Summary
PaymentFailureReasonuser-message mapping intoPaymentFailureReason+UserMessage.swiftwith generic and send-specific contexts.Closes #483
Simulator.Screen.Recording.-.iPhone.17.-.2026-08-04.at.19.07.07.mov