Skip to content

Conversation

@pwltr
Copy link
Contributor

@pwltr pwltr commented Dec 3, 2025

Description

  • pass connection protocol to ldk-node
  • roll back to last working electrum connection on failure
  • keep app status in sync on connection change
  • make keyboard dismissible by scroll and tap outside

Linked Issues/Tasks

Closes #256 #257

Screenshot / Video

Simulator.Screen.Recording.-.iPhone.17.-.2025-12-03.at.12.21.50.mov

@pwltr pwltr changed the title Fix/electrum settings fix: roll back electrum connection on failure Dec 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds robust error handling for Electrum server connections by implementing rollback to the last working configuration on connection failures. Key changes include passing connection protocol (tcp:// or ssl://) to ldk-node, validating connections before saving configuration, and keeping app status synchronized during connection changes. The PR also improves UI usability by making the keyboard dismissible via scroll and tap gestures.

  • Adds connection validation and rollback mechanism when Electrum server changes fail
  • Updates protocol handling to pass full URLs with tcp:// or ssl:// prefixes to ldk-node
  • Synchronizes wallet state after connection changes to keep UI status accurate

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ElectrumSettingsScreen.swift Adds keyboard dismissal functionality and wallet state synchronization after connection changes
WalletViewModel.swift Updates to use fullUrl property and adds lifecycle state synchronization in syncNodeStatus
SettingsViewModel.swift Replaces protocol prefix concatenation with fullUrl property usage
SettingsViewModel+Rgs.swift Updates RGS configuration to use fullUrl property
SettingsViewModel+Electrum.swift Implements connection validation and rollback logic, adds protocol prefix parsing for QR codes
LightningService.swift Adds error handling with recovery via restartWithPreviousConfig method
ElectrumConfigService.swift Updates default server parsing to handle protocol prefixes
ElectrumServer.swift Adds fullUrl computed property for protocol-prefixed URLs
Env.swift Updates default Electrum server URLs to include protocol prefixes

@pwltr pwltr requested a review from piotr-iohk December 3, 2025 15:56
@pwltr
Copy link
Contributor Author

pwltr commented Dec 3, 2025

@piotr-iohk Can I merge or do I need to rerun e2e tests first?

@piotr-iohk
Copy link
Collaborator

@piotr-iohk Can I merge or do I need to rerun e2e tests first?

Good to merge, tests are updated and green.

@pwltr pwltr merged commit 55c6a80 into master Dec 3, 2025
13 of 16 checks passed
@pwltr pwltr deleted the fix/electrum-settings branch December 3, 2025 16:01
BitcoinErrorLog pushed a commit to BitcoinErrorLog/bitkit-ios that referenced this pull request Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS Electrum settings: keyboard covers connect/reset buttons iOS electrum settings ignore TLS selection and persist broken configs

4 participants