@@ -42,13 +42,9 @@ struct ReceiveQr: View {
4242 }
4343 }
4444
45- private var hasUsableChannels : Bool {
46- return wallet. channels? . contains ( where: \. isChannelReady) ?? false
47- }
48-
4945 private var availableTabItems : [ TabItem < ReceiveTab > ] {
5046 // Only show unified tab if there are usable channels
51- if hasUsableChannels {
47+ if wallet . hasUsableChannels {
5248 return [
5349 TabItem ( . savings) ,
5450 TabItem ( . unified, activeColor: . white) ,
@@ -63,7 +59,7 @@ struct ReceiveQr: View {
6359 }
6460
6561 var showingCjitOnboarding : Bool {
66- return !hasUsableChannels && cjitInvoice == nil && selectedTab == . spending
62+ return !wallet . hasUsableChannels && cjitInvoice == nil && selectedTab == . spending
6763 }
6864
6965 var body : some View {
@@ -79,7 +75,7 @@ struct ReceiveQr: View {
7975 TabView ( selection: $selectedTab) {
8076 tabContent ( for: . savings)
8177
82- if hasUsableChannels {
78+ if wallet . hasUsableChannels {
8379 tabContent ( for: . unified)
8480 }
8581
@@ -100,7 +96,7 @@ struct ReceiveQr: View {
10096 . foregroundColor ( . purpleAccent) ,
10197 isDisabled: wallet. nodeLifecycleState != . running
10298 ) {
103- if GeoService . shared. isGeoBlocked && !hasUsableChannels {
99+ if GeoService . shared. isGeoBlocked && !wallet . hasUsableChannels {
104100 navigationPath. append ( . cjitGeoBlocked)
105101 } else {
106102 navigationPath. append ( . cjitAmount)
0 commit comments