From 43562be8109221e9465420707b9015dbf7961e23 Mon Sep 17 00:00:00 2001 From: Mukan Erkin Date: Sun, 19 Apr 2026 06:56:07 +0300 Subject: [PATCH] fix: usdt input min validasyonu --- src/web/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/web/index.html b/src/web/index.html index 47261d5..37c6375 100644 --- a/src/web/index.html +++ b/src/web/index.html @@ -258,7 +258,9 @@ async function loadSymbols() { onChange(value) { const item = allSymbols.find(s => s.symbol === value); if (!item) return; - document.getElementById('f-usdt').value = item.min_notional; + const usdtInput = document.getElementById('f-usdt'); + usdtInput.value = item.min_notional; + usdtInput.min = item.min_notional; document.getElementById('f-min-label').textContent = `(min ${item.min_notional} USDT)`; }, }); @@ -340,7 +342,10 @@ async function createBot() { const usdt_amount = parseFloat(document.getElementById('f-usdt').value); const profit_percent = parseFloat(document.getElementById('f-profit').value); const testnet = document.getElementById('f-testnet').value === 'true'; + const usdtInput = document.getElementById('f-usdt'); + const minNotional = parseFloat(usdtInput.min) || 0; if (!name || !symbol || !usdt_amount || !profit_percent) { alert('Tüm alanları doldurun'); return; } + if (usdt_amount < minNotional) { alert(`Minimum işlem miktarı ${minNotional} USDT`); usdtInput.focus(); return; } await api('POST', '/bots', { name, symbol, timeframe, usdt_amount, profit_percent, testnet }); closeModal(); document.getElementById('f-name').value = '';