diff options
Diffstat (limited to 'Rune/Views/Settings/SettingsView.swift')
| -rw-r--r-- | Rune/Views/Settings/SettingsView.swift | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Rune/Views/Settings/SettingsView.swift b/Rune/Views/Settings/SettingsView.swift index 4d07887..a776956 100644 --- a/Rune/Views/Settings/SettingsView.swift +++ b/Rune/Views/Settings/SettingsView.swift @@ -2,6 +2,7 @@ import SwiftUI struct SettingsView: View { @ObservedObject var viewModel: SettingsViewModel + @ObservedObject var walletViewModel: WalletViewModel let onLogout: () -> Void @State private var showingLogoutConfirmation = false @@ -33,6 +34,12 @@ struct SettingsView: View { } } .disabled(viewModel.client == nil || viewModel.isLoadingBalance) + + if let client = viewModel.client { + NavigationLink("Transactions") { + WalletTransactionsView(viewModel: walletViewModel, client: client) + } + } } Section("Account") { @@ -57,11 +64,13 @@ struct SettingsView: View { titleVisibility: .visible ) { Button("Log Out", role: .destructive) { - do { - try viewModel.logout() - onLogout() - } catch { - viewModel.errorMessage = error.localizedDescription + Task { + do { + try await viewModel.logout() + onLogout() + } catch { + viewModel.errorMessage = error.localizedDescription + } } } |
