fix tests

This commit is contained in:
seavor 2026-04-20 22:17:32 -05:00
parent a75abe1454
commit 88489ea2eb
9 changed files with 27 additions and 28 deletions

View file

@ -6,7 +6,6 @@ import { LoadingState, useKnownHosts, useReduxEffect, useWebClient } from '@app/
import { getHostPort, HostDTO } from '@app/services';
import { ServerDispatch, ServerSelectors, ServerTypes, useAppSelector } from '@app/store';
import { App } from '@app/types';
import { passwordSaltSupported } from '@app/websocket';
export enum TestConnection {
TESTING = 'testing',
@ -83,14 +82,13 @@ export function useKnownHostsComponent({
testConnection(selectedHost);
}, [selectedHost]);
useReduxEffect<{ serverOptions: number }>(({ payload: { serverOptions } }) => {
useReduxEffect<{ supportsHashedPassword: boolean }>(({ payload: { supportsHashedPassword } }) => {
const host = pendingTestRef.current;
if (!host) {
return;
}
pendingTestRef.current = null;
const supportsHashedPassword = passwordSaltSupported(serverOptions);
if (host.id != null && host.supportsHashedPassword !== supportsHashedPassword) {
void knownHosts.update(host.id, { supportsHashedPassword });
}