Skip to content

Commit 9976389

Browse files
committed
fix: infrequent but persistent issue with ui state (part 2)
1 parent ada2f0a commit 9976389

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

BDKSwiftExampleWallet/View Model/Activity/ActivityListViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ class ActivityListViewModel {
111111
}
112112

113113
func syncOrFullScan() async {
114+
self.walletSyncState = .syncing
114115
await startSyncWithProgress()
115116
}
116117
}

BDKSwiftExampleWallet/View Model/Settings/SettingsViewModel.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ class SettingsViewModel: ObservableObject {
6262
}
6363

6464
func fullScanWithProgress() async {
65-
DispatchQueue.main.async {
66-
self.walletSyncState = .syncing
67-
}
65+
self.walletSyncState = .syncing
6866
do {
6967
let inspector = WalletFullScanScriptInspector(updateProgress: updateProgressFullScan)
7068
try await bdkClient.fullScanWithInspector(inspector)

0 commit comments

Comments
 (0)