SHA256
Исправить регистрацию и навести порядок в UI deploy
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { resolveShineServerByServerLogin } from './shine-server-resolver.js';
|
||||
import { SOLANA_ENDPOINT_DEFAULT } from '../solana-programs.js';
|
||||
import { state } from '../state.js';
|
||||
|
||||
function normalizeUrl(value) {
|
||||
return String(value || '').trim();
|
||||
@@ -121,12 +121,13 @@ export async function resolveAndCheckShineServerLogin(serverLogin, solanaEndpoin
|
||||
};
|
||||
}
|
||||
|
||||
export async function checkServerAvailabilityByKey(key, url) {
|
||||
export async function checkServerAvailabilityByKey(key, url, options = {}) {
|
||||
const selectedSolanaEndpoint = normalizeUrl(options?.solanaEndpoint || state.entrySettings.solanaServer);
|
||||
if (key === 'solanaServer') {
|
||||
return (await checkSolanaRpc(url)) ? 'available' : 'unavailable';
|
||||
}
|
||||
if (key === 'shineServerLogin') {
|
||||
return (await resolveAndCheckShineServerLogin(url, SOLANA_ENDPOINT_DEFAULT)).status;
|
||||
return (await resolveAndCheckShineServerLogin(url, selectedSolanaEndpoint)).status;
|
||||
}
|
||||
if (key === 'shineServer') {
|
||||
return (await checkShineWs(url)) ? 'available' : 'unavailable';
|
||||
|
||||
Reference in New Issue
Block a user