Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions BDKSwiftExampleWallet/App/BDKSwiftExampleWalletApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ import SwiftUI
@main
struct BDKSwiftExampleWalletApp: App {
@AppStorage("isOnboarding") var isOnboarding: Bool = true
@State private var navigationPath = NavigationPath()

var body: some Scene {
WindowGroup {
if isOnboarding {
OnboardingView(viewModel: .init(bdkClient: .live))
} else {
HomeView(viewModel: .init(bdkClient: .live))
NavigationStack(path: $navigationPath) {
if isOnboarding {
OnboardingView(viewModel: .init(bdkClient: .live))
} else {
HomeView(viewModel: .init(bdkClient: .live))
}
}
.onChange(of: isOnboarding) { oldValue, newValue in
navigationPath = NavigationPath()
}
}
}

}
2 changes: 2 additions & 0 deletions BDKSwiftExampleWallet/View/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct SettingsView: View {
@State private var showingDeleteSeedConfirmation = false
@State private var showingShowSeedConfirmation = false
@State private var isSeedPresented = false
@Environment(\.dismiss) private var dismiss

var body: some View {

Expand Down Expand Up @@ -112,6 +113,7 @@ struct SettingsView: View {
) {
Button("Yes", role: .destructive) {
viewModel.delete()
dismiss()
}
Button("No", role: .cancel) {}
}
Expand Down
Loading
Loading