Skip to content

Commit bc35d67

Browse files
committed
format
1 parent 286c39b commit bc35d67

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

BDKSwiftExampleWallet/Extensions/BDK+Extensions/CbfClient+Extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extension CbfClient {
2828
.build(wallet: wallet)
2929

3030
components.node.run()
31-
31+
3232
components.client.startBackgroundMonitoring()
3333

3434
return (client: components.client, node: components.node)

BDKSwiftExampleWallet/View Model/WalletViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class WalletViewModel {
108108
if progress > 0 {
109109
self.isKyotoConnected = true
110110
}
111-
111+
112112
// Update sync state based on Kyoto progress
113113
if progress >= 100 {
114114
self.walletSyncState = .synced
@@ -125,7 +125,7 @@ class WalletViewModel {
125125
) { [weak self] notification in
126126
if let connected = notification.userInfo?["connected"] as? Bool {
127127
self?.isKyotoConnected = connected
128-
128+
129129
// When Kyoto connects, update sync state if needed
130130
if connected && self?.walletSyncState == .notStarted {
131131
// Check current progress to determine state

BDKSwiftExampleWallet/View/Home/ActivityHomeHeaderView.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct ActivityHomeHeaderView: View {
4040
} else if walletSyncState == .syncing {
4141
HStack {
4242
if isKyotoClient {
43-
if progress < 100.0 { // Kyoto progress is percent
43+
if progress < 100.0 { // Kyoto progress is percent
4444
if currentBlockHeight > 0 {
4545
Text("Block \(currentBlockHeight)")
4646
.padding(.trailing, -5.0)
@@ -55,7 +55,7 @@ struct ActivityHomeHeaderView: View {
5555
.transition(.opacity)
5656
}
5757
}
58-
} else if progress < 1.0 { // Esplora progress is fraction
58+
} else if progress < 1.0 { // Esplora progress is fraction
5959
Text("\(inspectedScripts)")
6060
.padding(.trailing, -5.0)
6161
.fontWeight(.semibold)
@@ -71,7 +71,8 @@ struct ActivityHomeHeaderView: View {
7171
}
7272

7373
if !isKyotoClient || (isKyotoClient && progress > 0) {
74-
let percent: Int = isKyotoClient
74+
let percent: Int =
75+
isKyotoClient
7576
? Int(progress.rounded())
7677
: Int((progress * 100).rounded())
7778
HStack(spacing: 0) {

BDKSwiftExampleWallet/View/WalletView.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ struct WalletView: View {
137137
.onAppear {
138138
// Seed height from AppStorage on first show to avoid displaying 0 when Kyoto is active
139139
if viewModel.isKyotoClient,
140-
viewModel.currentBlockHeight == 0,
141-
kyotoLastHeight > 0 {
140+
viewModel.currentBlockHeight == 0,
141+
kyotoLastHeight > 0
142+
{
142143
viewModel.currentBlockHeight = UInt32(kyotoLastHeight)
143144
}
144145
}

0 commit comments

Comments
 (0)