diff --git a/package.json b/package.json index 4b57830..57f83cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pezkuwi-telegram-miniapp", - "version": "1.0.181", + "version": "1.0.183", "type": "module", "description": "Pezkuwichain Telegram Mini App - Forum, Announcements, Rewards", "author": "Pezkuwichain Team", diff --git a/src/components/wallet/DepositUSDTModal.tsx b/src/components/wallet/DepositUSDTModal.tsx index b4c5443..1c6794f 100644 --- a/src/components/wallet/DepositUSDTModal.tsx +++ b/src/components/wallet/DepositUSDTModal.tsx @@ -40,7 +40,7 @@ const NETWORKS: NetworkInfo[] = [ description: 'Telegram Wallet', icon: '💎', recommended: true, - fee: 0.05, + fee: 0.1, explorer: 'https://tonviewer.com/transaction/', minDeposit: 10, }, @@ -50,7 +50,7 @@ const NETWORKS: NetworkInfo[] = [ description: 'Asset Hub', icon: '⚪', recommended: true, - fee: 0.05, + fee: 0.1, explorer: 'https://assethub-polkadot.subscan.io/extrinsic/', minDeposit: 10, }, @@ -61,8 +61,7 @@ const NETWORKS: NetworkInfo[] = [ icon: '🔴', recommended: false, fee: 3, - feeWarning: - 'TRC20 ağ masrafı yaklaşık $3 civarındadır. 1000 USDT altındaki gönderimlerde verimli değildir. TON veya Polkadot ağını öneriyoruz.', + feeWarning: 'Mesrefa tora TRC20 bi qasî $3 ye. Em tora TON an Polkadot pêşniyar dikin.', explorer: 'https://tronscan.org/#/transaction/', minDeposit: 10, }, diff --git a/src/version.json b/src/version.json index 466db1a..c2d432c 100644 --- a/src/version.json +++ b/src/version.json @@ -1,5 +1,5 @@ { - "version": "1.0.181", - "buildTime": "2026-02-08T02:31:45.624Z", - "buildNumber": 1770517905625 + "version": "1.0.183", + "buildTime": "2026-02-08T02:58:45.175Z", + "buildNumber": 1770519525176 } diff --git a/supabase/functions/check-deposits/index.ts b/supabase/functions/check-deposits/index.ts index ae61f71..11cd8e7 100644 --- a/supabase/functions/check-deposits/index.ts +++ b/supabase/functions/check-deposits/index.ts @@ -15,6 +15,10 @@ import { secp256k1 } from 'https://esm.sh/@noble/curves@1.2.0/secp256k1'; const ALLOWED_ORIGIN = 'https://telegram.pezkuwichain.io'; const MIN_DEPOSIT = 10; // Minimum 10 USDT + +// Platform fees per network +const TON_FEE = 0.1; // $0.1 fee for TON +const POLKADOT_FEE = 0.1; // $0.1 fee for Polkadot const TRC20_FEE = 3; // $3 fee for TRC20 // API endpoints @@ -135,11 +139,14 @@ async function checkTonDeposits( continue; } - // Create deposit record + // Calculate net amount after platform fee + const netAmount = Math.max(0, amount - TON_FEE); + + // Create deposit record with net amount const { error } = await supabase.from('tg_deposits').insert({ user_id: depositCode.user_id, network: 'ton', - amount, + amount: netAmount, tx_hash: txHash, memo: comment, status: 'confirming', @@ -203,12 +210,15 @@ async function checkPolkadotDeposits( result.found++; + // Calculate net amount after platform fee + const netAmount = Math.max(0, amount - POLKADOT_FEE); + // For Polkadot, memo might be in extrinsic data // Try to find user by checking system.remark in same block // For now, create as pending without user const { error } = await supabase.from('tg_deposits').insert({ network: 'polkadot', - amount, + amount: netAmount, tx_hash: txHash, status: 'confirming', });