File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
BDKSwiftExampleWallet/Service/BDK Service Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -518,20 +518,14 @@ private class BDKService {
518518 }
519519
520520 func deleteWallet( ) throws {
521- let savedURL = try ? keyClient. getEsploraURL ( )
522- let savedNetwork = try ? keyClient. getNetwork ( )
523-
524521 if let bundleID = Bundle . main. bundleIdentifier {
525522 UserDefaults . standard. removePersistentDomain ( forName: bundleID)
526523 }
527524 try self . keyClient. deleteBackupInfo ( )
528525 try Persister . deleteConnection ( )
529- if let savedURL = savedURL {
530- try keyClient. saveEsploraURL ( savedURL)
531- }
532- if let savedNetwork = savedNetwork {
533- try keyClient. saveNetwork ( savedNetwork)
534- }
526+ // Clear persisted network and esplora URL to avoid cross-network carryover
527+ try ? keyClient. deleteNetwork ( )
528+ try ? keyClient. deleteEsplora ( )
535529
536530 needsFullScan = true
537531 }
You can’t perform that action at this time.
0 commit comments