Skip to content

Commit 2521e9d

Browse files
committed
Removed full scan when syncing with Kyoto
1 parent 79a94be commit 2521e9d

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

BDKSwiftExampleWallet/Service/BDKSyncService/BDKSyncService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// BDKService2.swift
2+
// BDKSyncService.swift
33
// BDKSwiftExampleWallet
44
//
55
// Created by Rubens Machion on 16/05/25.

BDKSwiftExampleWallet/View/Settings/SettingsView.swift

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,27 @@ struct SettingsView: View {
6060
colorScheme == .light ? Color.gray.opacity(0.1) : Color.black.opacity(0.2)
6161
)
6262

63-
Section(header: Text("Wallet")) {
64-
Button {
65-
Task {
66-
await viewModel.fullScanWithProgress()
63+
if viewModel.syncMode == .esplora {
64+
Section(header: Text("Wallet")) {
65+
Button {
66+
Task {
67+
await viewModel.fullScanWithProgress()
68+
}
69+
} label: {
70+
Text("Full Scan")
71+
}
72+
.foregroundStyle(Color.bitcoinOrange)
73+
if viewModel.walletSyncState == .syncing {
74+
Text("\(viewModel.inspectedScripts)")
75+
.contentTransition(.numericText())
76+
.foregroundStyle(.primary)
77+
.animation(.easeInOut, value: viewModel.inspectedScripts)
6778
}
68-
} label: {
69-
Text("Full Scan")
70-
}
71-
.foregroundStyle(Color.bitcoinOrange)
72-
if viewModel.walletSyncState == .syncing {
73-
Text("\(viewModel.inspectedScripts)")
74-
.contentTransition(.numericText())
75-
.foregroundStyle(.primary)
76-
.animation(.easeInOut, value: viewModel.inspectedScripts)
7779
}
80+
.listRowBackground(
81+
colorScheme == .light ? Color.gray.opacity(0.1) : Color.black.opacity(0.2)
82+
)
7883
}
79-
.listRowBackground(
80-
colorScheme == .light ? Color.gray.opacity(0.1) : Color.black.opacity(0.2)
81-
)
8284

8385
Section(header: Text("Danger Zone")) {
8486
Button {

0 commit comments

Comments
 (0)