diff --git a/BDKSwiftExampleWallet/Resources/Localizable.xcstrings b/BDKSwiftExampleWallet/Resources/Localizable.xcstrings index bc97b415..0d160c46 100644 --- a/BDKSwiftExampleWallet/Resources/Localizable.xcstrings +++ b/BDKSwiftExampleWallet/Resources/Localizable.xcstrings @@ -760,6 +760,10 @@ }, "Kyoto" : { + }, + "Loading wallet…" : { + "comment" : "A message displayed while the wallet is loading.", + "isCommentAutoGenerated" : true }, "Navigation Title" : { "extractionState" : "stale", diff --git a/BDKSwiftExampleWallet/View/HomeView.swift b/BDKSwiftExampleWallet/View/HomeView.swift index 119e31b6..fd05ed1e 100644 --- a/BDKSwiftExampleWallet/View/HomeView.swift +++ b/BDKSwiftExampleWallet/View/HomeView.swift @@ -15,14 +15,19 @@ struct HomeView: View { ZStack { Color(uiColor: UIColor.systemBackground) - WalletView( - viewModel: .init( - bdkClient: .live, - priceClient: .live - ), - sendNavigationPath: $navigationPath - ) - .tint(.primary) + if viewModel.isWalletLoaded { + WalletView( + viewModel: .init( + bdkClient: .live, + priceClient: .live + ), + sendNavigationPath: $navigationPath + ) + .tint(.primary) + } else { + ProgressView("Loading wallet…") + .tint(.primary) + } } .onAppear { viewModel.loadWallet()