@@ -100,6 +100,12 @@ private class BDKService {
100100 let storedClientType = try ? keyClient. getClientType ( )
101101 self . clientType = storedClientType ?? . esplora
102102
103+ // Ensure Kyoto always uses Signet
104+ if self . clientType == . kyoto && self . network != . signet {
105+ self . network = . signet
106+ try ? keyClient. saveNetwork ( Network . signet. description)
107+ }
108+
103109 if self . clientType == . kyoto {
104110 self . blockchainURL = Constants . Config. Kyoto. getDefaultPeer ( for: self . network)
105111 } else {
@@ -118,6 +124,15 @@ private class BDKService {
118124 return
119125 }
120126
127+ // If Kyoto is selected force network to Signet and persist correction
128+ if self . clientType == . kyoto && newNetwork != . signet {
129+ self . network = . signet
130+ try ? keyClient. saveNetwork ( Network . signet. description)
131+ self . blockchainURL = Constants . Config. Kyoto. getDefaultPeer ( for: . signet)
132+ updateBlockchainClient ( )
133+ return
134+ }
135+
121136 self . network = newNetwork
122137 try ? keyClient. saveNetwork ( newNetwork. description)
123138
@@ -126,7 +141,7 @@ private class BDKService {
126141 let newURL = newNetwork. url
127142 updateBlockchainURL ( newURL)
128143 } else if self . clientType == . kyoto {
129- // For Kyoto, update to the correct peer for the new network
144+ // For Kyoto update to the correct peer for the new network
130145 let newPeer = Constants . Config. Kyoto. getDefaultPeer ( for: newNetwork)
131146 self . blockchainURL = newPeer
132147 updateBlockchainClient ( )
@@ -666,7 +681,12 @@ extension BDKService {
666681
667682 // Update URL to match the new client type
668683 if newType == . kyoto {
669- self . blockchainURL = Constants . Config. Kyoto. getDefaultPeer ( for: self . network)
684+ // Force Signet network for Kyoto and persist the corrected network
685+ if self . network != . signet {
686+ self . network = . signet
687+ try ? keyClient. saveNetwork ( Network . signet. description)
688+ }
689+ self . blockchainURL = Constants . Config. Kyoto. getDefaultPeer ( for: . signet)
670690 } else if newType == . esplora {
671691 // Keep existing URL if it's valid for this network, otherwise use default
672692 let defaultEsploraURL = self . network. url
0 commit comments