File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
BDKSwiftExampleWallet/View Model Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,11 @@ class WalletViewModel {
110110 if self . bdkClient. getClientType ( ) != . kyoto { return }
111111 if let progress = notification. userInfo ? [ " progress " ] as? Float {
112112 self . updateKyotoProgress ( progress)
113+ // Consider any progress update as evidence of an active connection
114+ // so the UI does not falsely show a red disconnected indicator while syncing.
115+ if progress > 0 {
116+ self . isKyotoConnected = true
117+ }
113118
114119 // Update sync state based on Kyoto progress
115120 if progress >= 100 {
@@ -150,6 +155,8 @@ class WalletViewModel {
150155 if self . bdkClient. getClientType ( ) != . kyoto { return }
151156 if let height = notification. userInfo ? [ " height " ] as? UInt32 {
152157 self . currentBlockHeight = height
158+ // Receiving chain height implies we have peer connectivity
159+ self . isKyotoConnected = true
153160 // Auto-refresh wallet data when Kyoto receives new blocks
154161 self . getBalance ( )
155162 self . getTransactions ( )
You can’t perform that action at this time.
0 commit comments