diff --git a/VERSION.properties b/VERSION.properties index 920a658b..3cb97578 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.345 -server.version=1.2.317 +client.version=1.2.346 +server.version=1.2.318 diff --git a/shine-UI/js/deploy-config.js b/shine-UI/js/deploy-config.js index cb6a5c30..af2db939 100644 --- a/shine-UI/js/deploy-config.js +++ b/shine-UI/js/deploy-config.js @@ -6,4 +6,4 @@ export const defaultServerAddress = 'shineup.me'; export const defaultServerHttp = `https://${defaultServerAddress}`; export const defaultServerWs = `wss://${defaultServerAddress}/ws`; export const defaultSolanaCluster = 'mainnet-beta'; -export const defaultSolanaEndpoint = 'https://solana-rpc.publicnode.com'; +export const defaultSolanaEndpoint = 'https://public.rpc.solanavibestation.com/'; diff --git a/shine-UI/js/pages/registration-payment-view.js b/shine-UI/js/pages/registration-payment-view.js index 8240524f..e7976e1f 100644 --- a/shine-UI/js/pages/registration-payment-view.js +++ b/shine-UI/js/pages/registration-payment-view.js @@ -25,6 +25,7 @@ import { defaultServerLogin } from '../deploy-config.js'; export const pageMeta = { id: 'registration-payment-view', title: 'Оплата регистрации', showAppChrome: false }; const MIN_REQUIRED_SOL = 0.01; +const RECOMMENDED_TOPUP_SOL = 0.02; const AUTO_LOGIN_INITIAL_DELAY_MS = 1000; const AUTO_LOGIN_RETRY_MS = 2000; const REGISTRATION_PROGRESS_DURATION_MS = 12000; @@ -42,6 +43,20 @@ function getExplorerClusterName(endpoint) { return 'mainnet-beta'; } +function isTestRegistrationContour() { + const solanaCluster = getExplorerClusterName(state.entrySettings.solanaServer); + if (solanaCluster !== 'mainnet-beta') return true; + const shineServer = String(state.entrySettings.shineServer || '').trim().toLowerCase(); + const shineServerLogin = String(state.entrySettings.shineServerLogin || '').trim().toLowerCase(); + return ( + shineServer.includes('t1.shineup.me') + || shineServer.includes('t2.shineup.me') + || shineServer.includes('t3.shineup.me') + || shineServer.includes('t4.shineup.me') + || ['t1', 't2', 't3', 't4'].includes(shineServerLogin) + ); +} + function makeSolanaExplorerTxUrl(signature, endpoint) { const cleanSignature = String(signature || '').trim(); if (!cleanSignature) return ''; @@ -152,14 +167,16 @@ export function render({ navigate }) { walletValue.type = 'text'; walletValue.value = state.registrationPayment.walletAddress || ''; walletValue.readOnly = true; + walletValue.style.width = '100%'; const walletRow = document.createElement('div'); - walletRow.className = 'inline-input-row'; + walletRow.className = 'stack'; const copyButton = document.createElement('button'); copyButton.className = 'ghost-btn'; copyButton.type = 'button'; copyButton.textContent = 'Скопировать номер'; + copyButton.style.width = '100%'; copyButton.addEventListener('click', async () => { try { await navigator.clipboard.writeText(walletValue.value); @@ -232,6 +249,7 @@ export function render({ navigate }) { balanceRow.append(balanceValue, refreshButton); + const isTestContour = isTestRegistrationContour(); const topupButton = document.createElement('button'); topupButton.className = 'ghost-btn'; topupButton.type = 'button'; @@ -277,11 +295,15 @@ export function render({ navigate }) { if (currentBalance == null) return; if (currentBalance < MIN_REQUIRED_SOL) { status.className = 'status-line is-unavailable'; - status.textContent = `Для регистрации нужно минимум ${MIN_REQUIRED_SOL} SOL. Сейчас на кошельке ${formatSol(currentBalance, 6)} SOL. Пополните на промо-странице или попросите перевод у знакомого с тестовыми SOL.`; + status.textContent = isTestContour + ? `Для регистрации нужно минимум ${MIN_REQUIRED_SOL} SOL. Рекомендуем пополнить кошелёк примерно на ${RECOMMENDED_TOPUP_SOL} SOL. Сейчас на кошельке ${formatSol(currentBalance, 6)} SOL.` + : `Для регистрации пополните этот кошелёк соланами примерно на ${RECOMMENDED_TOPUP_SOL} SOL. Сейчас на кошельке ${formatSol(currentBalance, 6)} SOL. Минимум для продолжения: ${MIN_REQUIRED_SOL} SOL.`; status.style.display = ''; - const openTopup = window.confirm('Открыть страницу пополнения с вашим кошельком?'); - if (openTopup) { - window.open(getTopupSiteUrl(walletAddress), '_blank', 'noopener,noreferrer'); + if (isTestContour) { + const openTopup = window.confirm('Открыть страницу пополнения с вашим кошельком?'); + if (openTopup) { + window.open(getTopupSiteUrl(walletAddress), '_blank', 'noopener,noreferrer'); + } } return; } @@ -323,15 +345,18 @@ export function render({ navigate }) { }); card.innerHTML = ` -
Для регистрации в тестовой Solana нужно минимум 0,01 SOL на вашем кошельке.
- +Для регистрации пополните этот кошелёк соланами примерно на ${RECOMMENDED_TOPUP_SOL} SOL.
+