@@ -6,6 +6,12 @@ struct SavingsWalletView: View {
66 @EnvironmentObject var navigation : NavigationViewModel
77 @EnvironmentObject var wallet : WalletViewModel
88
9+ /// Whether there are any onchain activities to display
10+ private var hasOnchainActivities : Bool {
11+ guard let activities = activity. onchainActivities else { return false }
12+ return !activities. isEmpty
13+ }
14+
915 /// Calculate remaining duration for force close transfers
1016 private var forceCloseRemainingDuration : String ? {
1117 guard let claimableAtHeight = wallet. forceCloseClaimableAtHeight,
@@ -42,8 +48,8 @@ struct SavingsWalletView: View {
4248 . padding ( . top, 16 )
4349 }
4450
45- if wallet. totalOnchainSats > 0 {
46- if !GeoService. shared. isGeoBlocked {
51+ if wallet. totalOnchainSats > 0 || hasOnchainActivities {
52+ if wallet . totalOnchainSats > 0 , !GeoService. shared. isGeoBlocked {
4753 transferButton
4854 . transition ( . move( edge: . leading) . combined ( with: . opacity) )
4955 . padding ( . top, 32 )
@@ -96,7 +102,7 @@ struct SavingsWalletView: View {
96102 . navigationBarHidden ( true )
97103 . animation ( . spring( response: 0.3 ) , value: wallet. totalOnchainSats)
98104 . overlay {
99- if wallet. totalOnchainSats == 0 {
105+ if wallet. totalOnchainSats == 0 && !hasOnchainActivities {
100106 EmptyStateView ( type: . savings)
101107 . padding ( . horizontal)
102108 . transition ( . move( edge: . trailing) . combined ( with: . opacity) )
0 commit comments