Skip to content

Commit

Permalink
feat(gui): Allow providers discovered via rendezvous to take priority (
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron authored Nov 16, 2024
1 parent aca0d6a commit 58800a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src-gui/src/store/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { isCliLogRelatedToSwap } from "models/cliModel";
import { SettingsState } from "./features/settingsSlice";
import { NodesSlice } from "./features/nodesSlice";
import { RatesState } from "./features/ratesSlice";
import { sortProviderList } from "utils/sortUtils";

export const useAppDispatch = () => useDispatch<AppDispatch>();
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
Expand Down Expand Up @@ -73,7 +74,9 @@ export function useAllProviders() {
return useAppSelector((state) => {
const registryProviders = state.providers.registry.providers || [];
const listSellersProviders = state.providers.rendezvous.providers || [];
return [...registryProviders, ...listSellersProviders];
const all = [...registryProviders, ...listSellersProviders];

return sortProviderList(all);
});
}

Expand Down

0 comments on commit 58800a5

Please sign in to comment.