Repository navigation
chore: remove the Boltz savings swap - #2214
Conversation
[Medium impact] The changes affect the savings-transfer workflow and developer swap tools. Keep recovery for existing Boltz swaps before merging. Findings
SummaryRemoves the Boltz savings-swap service, screens, settings, routes, strings, and tests. Savings transfers now always use the existing channel-close path.
Reviews (1) · Last reviewed commit: "chore: remove the Boltz savings swap" · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Removes the Boltz savings swap (BoltzService, the quote and swap path in TransferViewModel, the updates stream in WalletViewModel, the Swaps screens, the Dev Settings toggle and its setting, AmountSlider), leaving transfer to savings on the channel-close path it already took with the toggle off. Reviewed fbd7145, full tier, statically: not built here, CI is the gate.
What I checked, and 5 candidates I ruled out
Read in full: the diff of TransferViewModel.kt, WalletViewModel.kt, SavingsConfirmScreen.kt, SavingsProgressScreen.kt, ContentView.kt, DevSettingsScreen.kt, SettingsViewModel.kt, SettingsStore.kt, Env.kt, the test changes
Dangling references at the head: none for Boltz*, SavingsSwap*, SavingsTransferMode, Routes.SwapsSettings / SwapDetail, TransferSettling, SavingsSwapToggle; Slider (Quickpay) survives the AmountSlider removal
CI: detect-changes green; build-and-test, lint, compose-ui / ui-tests and build-local still running at the time of review
Ruled out
- Stored
isSavingsSwapEnabledbreaking settings decode:SettingsSerializerdecodes with the sharedjsonfromJsonModule.kt, which setsignoreUnknownKeys = true, so the stale key is dropped instead of falling back to defaults. - A swap in flight when a user upgrades: the reverse swap's preimage stays on the device, so without the claim Boltz cannot settle the hold invoice; the lockup times out and the HTLC fails back. Funds are held until the timeout, not lost, and only a mainnet build with the Dev Settings toggle on could have one.
- Spark fee timeout:
loadSparkWithdrawFeekeeps its 15 s bound under the newSPARK_FEE_TIMEOUT, same value as the removedSWAP_QUOTE_TIMEOUT. - Strings still in use: none of the 7 removed keys is referenced from Kotlin;
lightning__savings_confirm__amount_too_low, still used bySavingsConfirmScreen, is kept. - Lost coverage of the Spark fee pin: the removed "closing instead withdraws spark at the fee shown" case is covered by
the swipe withdraws spark at the fee it confirmed when spark is priced again before the withdrawal, still inTransferViewModelTest.kt.
Merge confidence: 4/5, no findings, but build-and-test and lint had not finished on fbd7145 when this was written.
Reviewer model: claude-opus-5-5
Reasoning effort: not exposed (the review runner does not report it)
|
Not changing
|
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
There was a problem hiding this comment.
Verdict: ✅ Approve
Review: full diff, 34 files.
Findings: None.
QA for fbd7145:
Built and tested a dev debug APK on an Android 16 Pixel 10 Pro emulator with a disposable regtest wallet.
Transfer to savings closes the selected channel ✅ Confirm and swipe initiate a cooperative close.
Manual case 1: transferred 500,000 regtest sats, saw Transfer Successful, and returned home with Spending at zero. The app logs identify a locally initiated cooperative close; LND independently confirmed COOPERATIVE_CLOSE after mining six blocks.
savings-transfer2x.2x.mp4
Dev Settings no longer offers Boltz swaps ✅ The full settings page has no Swaps section or toggle.
Manual case 2: opened and scrolled Dev Settings. The Swaps section, Swaps row and Enable Savings Swap toggle are absent. Separately checked that a stored isSavingsSwapEnabled=true is ignored on read.
dev-settings2x.2x.mp4
No mainnet Boltz swap or Spark withdrawal was driven. Spark fee and selection behavior was checked through the retained unit tests; the two opt-in live Spark exit probes were skipped.
Reviewed the full base-to-head change. Removed swap code and translations, settings decoding, and lifecycle cleanup received static review; the two manual cases cover channel closure and Dev Settings. The earlier recovery concern was withdrawn.
Twin: synonymdev/bitkit-ios#1562 at f50eda7 matches the Boltz removal and preserved channel-close behavior; iOS was compared statically.
Reviewed by gpt-6.1-sol-high
Closes #2213
Twin: synonymdev/bitkit-ios#1562
Unblocks the bitkit-core
0.8.0-rc16bump (synonymdev/bitkit-core#230), which drops the Boltz API. bitkit-core stays on rc15 here.Description
BoltzService, the swap path inTransferViewModel,SavingsConfirmScreenandSavingsProgressScreen, the swap updates stream inWalletViewModel,SwapsScreenandSwapsViewModel, the Dev Settings toggle and its setting,Env.isSwapSupported, andAmountSlider.strings.xml.Out of Scope
boltz.db. A storedisSavingsSwapEnabledis ignored on read.LightningRepo.payInvoiceWithNode, now used only by tests.Design
N/A: no user-facing change. The swap was a mainnet Dev Settings option, and transfer to savings closes the channel as it did with the toggle off.
Preview
N/A
QA Notes
Setup
A dev debug build of this branch with a channel open.
Journeys
N/A: no journey changes.
Manual Tests
Automated Checks
SwapsViewModelTest.kt, and the swap cases inTransferViewModelTest.ktandWalletViewModelTest.ktSavingsConfirmScreenTest.ktEvidence
fbd7145:compileDevDebugKotlin,testDevDebugUnitTest(7191 passed, 0 failed),detektandlintDevDebugpass.Gaps