@@ -114,7 +114,6 @@ export default function Filter() {
114
114
115
115
// Returns only the ownership options that are compatible with the other filters
116
116
function useFilteredOwnershipOptions ( providers : string [ ] , ownership : Ownership ) : Ownership [ ] {
117
- const relaySettings = useNormalRelaySettings ( ) ;
118
117
const tunnelProtocol = useTunnelProtocol ( ) ;
119
118
const bridgeState = useSelector ( ( state ) => state . settings . bridgeState ) ;
120
119
const locations = useSelector ( ( state ) => state . settings . relayLocations ) ;
@@ -126,7 +125,6 @@ function useFilteredOwnershipOptions(providers: string[], ownership: Ownership):
126
125
locations ,
127
126
endpointType ,
128
127
tunnelProtocol ,
129
- relaySettings ,
130
128
) ;
131
129
const relaylistForFilters = filterLocations ( relayListForEndpointType , ownership , providers ) ;
132
130
@@ -143,14 +141,13 @@ function useFilteredOwnershipOptions(providers: string[], ownership: Ownership):
143
141
}
144
142
145
143
return ownershipOptions ;
146
- } , [ locations , endpointType , tunnelProtocol , relaySettings , ownership , providers ] ) ;
144
+ } , [ locations , endpointType , tunnelProtocol , ownership , providers ] ) ;
147
145
148
146
return availableOwnershipOptions ;
149
147
}
150
148
151
149
// Returns only the providers that are compatible with the other filters
152
150
export function useFilteredProviders ( providers : string [ ] , ownership : Ownership ) : string [ ] {
153
- const relaySettings = useNormalRelaySettings ( ) ;
154
151
const tunnelProtocol = useTunnelProtocol ( ) ;
155
152
const bridgeState = useSelector ( ( state ) => state . settings . bridgeState ) ;
156
153
const locations = useSelector ( ( state ) => state . settings . relayLocations ) ;
@@ -162,11 +159,10 @@ export function useFilteredProviders(providers: string[], ownership: Ownership):
162
159
locations ,
163
160
endpointType ,
164
161
tunnelProtocol ,
165
- relaySettings ,
166
162
) ;
167
163
const relaylistForFilters = filterLocations ( relayListForEndpointType , ownership , providers ) ;
168
164
return providersFromRelays ( relaylistForFilters ) ;
169
- } , [ endpointType , locations , ownership , providers , relaySettings , tunnelProtocol ] ) ;
165
+ } , [ endpointType , locations , ownership , providers , tunnelProtocol ] ) ;
170
166
171
167
return availableProviders ;
172
168
}
@@ -188,12 +184,7 @@ function useProviders(): Record<string, boolean> {
188
184
189
185
const endpointType =
190
186
tunnelProtocol === 'openvpn' && bridgeState === 'on' ? EndpointType . any : EndpointType . exit ;
191
- const relays = filterLocationsByEndPointType (
192
- relayLocations ,
193
- endpointType ,
194
- tunnelProtocol ,
195
- relaySettings ,
196
- ) ;
187
+ const relays = filterLocationsByEndPointType ( relayLocations , endpointType , tunnelProtocol ) ;
197
188
const providers = providersFromRelays ( relays ) ;
198
189
199
190
// Empty containt array means that all providers are selected. No selection isn't possible.
0 commit comments