We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 884c955 commit b562767Copy full SHA for b562767
BDKSwiftExampleWallet/View Model/WalletViewModel.swift
@@ -270,4 +270,13 @@ class WalletViewModel {
270
await startSyncWithProgress()
271
}
272
273
+
274
+ /// Retry Kyoto sync and refresh cached data.
275
+ func retryKyotoSync() async {
276
+ guard isKyotoClient else { return }
277
+ await syncOrFullScan()
278
+ getBalance()
279
+ getTransactions()
280
+ await getPrices()
281
+ }
282
BDKSwiftExampleWallet/View/WalletView.swift
@@ -79,9 +79,7 @@ struct WalletView: View {
79
80
.refreshable {
81
if viewModel.isKyotoClient {
82
- viewModel.getBalance()
83
- viewModel.getTransactions()
84
- await viewModel.getPrices()
+ await viewModel.retryKyotoSync()
85
} else {
86
await viewModel.syncOrFullScan()
87
viewModel.getBalance()
0 commit comments