import { renderHeader } from '../components/header.js?v=20260405171816'; import { state } from '../state.js?v=20260405171816'; export const pageMeta = { id: 'topup-view', title: 'Пополнение счета', showAppChrome: false }; const BUY_LINK = 'https://www.moonpay.com/buy/sol'; export function render({ navigate }) { const screen = document.createElement('section'); screen.className = 'stack'; const walletValue = document.createElement('input'); walletValue.className = 'input'; walletValue.type = 'text'; walletValue.value = state.registrationPayment.walletAddress; walletValue.readOnly = true; walletValue.style.fontSize = '13px'; const copyButton = document.createElement('button'); copyButton.className = 'ghost-btn'; copyButton.type = 'button'; copyButton.textContent = 'Скопировать'; copyButton.addEventListener('click', async () => { try { await navigator.clipboard.writeText(walletValue.value); copyButton.textContent = 'Скопировано'; window.setTimeout(() => { copyButton.textContent = 'Скопировать'; }, 1500); } catch { window.alert('Не удалось скопировать номер кошелька.'); } }); const walletRow = document.createElement('div'); walletRow.className = 'inline-input-row'; walletRow.append(walletValue, copyButton); const card = document.createElement('div'); card.className = 'card stack'; card.innerHTML = `
Для пополнения счета скопируйте номер кошелька.