diff --git a/prediqo_web/src/features/treasury/TreasuryAdminPage.tsx b/prediqo_web/src/features/treasury/TreasuryAdminPage.tsx index ddeddf89..8d58e2d2 100644 --- a/prediqo_web/src/features/treasury/TreasuryAdminPage.tsx +++ b/prediqo_web/src/features/treasury/TreasuryAdminPage.tsx @@ -1,7 +1,11 @@ /** * Admin treasury: cold wallets, sweeps, cold → hot funding. + * Admins work in human USDT; raw chain units are derived for the API. */ import { + Accordion, + AccordionDetails, + AccordionSummary, Alert, Box, Button, @@ -12,6 +16,13 @@ import { DialogActions, DialogContent, DialogTitle, + Divider, + FormControl, + InputAdornment, + InputLabel, + Link, + MenuItem, + Select, Stack, Table, TableBody, @@ -22,13 +33,17 @@ import { Typography, } from '@mui/material'; import AccountBalanceWalletRoundedIcon from '@mui/icons-material/AccountBalanceWalletRounded'; +import ExpandMoreRoundedIcon from '@mui/icons-material/ExpandMoreRounded'; +import NorthEastRoundedIcon from '@mui/icons-material/NorthEastRounded'; +import ContentCopyRoundedIcon from '@mui/icons-material/ContentCopyRounded'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; -import { useState } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { api } from '../../shared/services/api'; import { PageHeader, RefreshIconButton } from '../../shared/components/PageHeader'; import { PermissionGate } from '../../shared/auth/PermissionGate'; import { ScrollableTable } from '../../shared/components/ScrollableTable'; +import { rawToHuman } from '../wallet/utils/walletFormat'; type WalletType = { id: number; @@ -38,22 +53,24 @@ type WalletType = { decimals: number; }; +type AssetRow = { + walletType: WalletType; + coldWallet: { id: string; address: string; label: string | null } | null; + hotWallet: { id: string; address: string } | null; + hotOnChainBalance: string | null; + coldOnChainBalance: string | null; + hotNativeBalance: string | null; + coldNativeBalance: string | null; + nativeSymbol: string | null; + nativeDecimals: number | null; + minNativeForWithdraw: string | null; + hotNativeOk: boolean | null; +}; + type TreasuryOverview = { sweepEnabled: boolean; withdrawalsEnabled: boolean; - assets: Array<{ - walletType: WalletType; - coldWallet: { id: string; address: string; label: string | null } | null; - hotWallet: { id: string; address: string } | null; - hotOnChainBalance: string | null; - coldOnChainBalance: string | null; - hotNativeBalance: string | null; - coldNativeBalance: string | null; - nativeSymbol: string | null; - nativeDecimals: number | null; - minNativeForWithdraw: string | null; - hotNativeOk: boolean | null; - }>; + assets: AssetRow[]; recentPendingSweeps: number; recentFailedSweeps: number; inProgressSweeps?: { @@ -82,19 +99,22 @@ type SweepRow = { createdAt: string; }; -function formatRaw(amount: string | null, decimals: number): string { - if (amount == null) return '—'; - try { - const raw = BigInt(amount); - const base = 10n ** BigInt(decimals); - const whole = raw / base; - const frac = raw % base; - if (frac === 0n) return whole.toString(); - const fracStr = frac.toString().padStart(decimals, '0').replace(/0+$/, ''); - return `${whole.toString()}.${fracStr}`; - } catch { - return amount; - } +/** Precise human → raw (avoids float errors on 18-decimal BEP20). */ +function humanAmountToRaw(human: string, decimals: number): string { + const cleaned = human.replace(/,/g, '').replace(/\s/g, '').trim(); + if (!cleaned || !/^\d+(\.\d+)?$/.test(cleaned)) return '0'; + const [wholePart, fracPart = ''] = cleaned.split('.'); + if (fracPart.length > decimals) return '0'; + const fracPadded = fracPart.padEnd(decimals, '0'); + const raw = + BigInt(wholePart || '0') * 10n ** BigInt(decimals) + BigInt(fracPadded || '0'); + return raw.toString(); +} + +function shortAddress(address: string | null | undefined, head = 6, tail = 4): string { + if (!address) return '—'; + if (address.length <= head + tail + 1) return address; + return `${address.slice(0, head)}…${address.slice(-tail)}`; } function explorerUrl(network: string, address: string): string | null { @@ -104,13 +124,82 @@ function explorerUrl(network: string, address: string): string | null { return null; } +function txExplorerUrl(network: string, txId: string): string | null { + if (!txId) return null; + if (network === 'BSC') return `https://bscscan.com/tx/${txId}`; + if (network === 'TRON') return `https://tronscan.org/#/transaction/${txId}`; + return null; +} + +function networkLabel(network: string): string { + if (network === 'BSC') return 'BEP20 · BSC'; + if (network === 'TRON') return 'TRC20 · TRON'; + return network; +} + +async function copyText(text: string): Promise { + try { + await navigator.clipboard.writeText(text); + } catch { + /* ignore */ + } +} + +function AddressLine({ + label, + address, + network, +}: { + label: string; + address: string | null | undefined; + network: string; +}) { + const { t } = useTranslation(); + if (!address) { + return ( + + {label}: — + + ); + } + const href = explorerUrl(network, address); + return ( + + + {label} + + + {shortAddress(address)} + + + {href && ( + + {t('admin.treasury.viewOnExplorer')} + + )} + + ); +} + export function TreasuryAdminPage() { const { t } = useTranslation(); const qc = useQueryClient(); const [coldForms, setColdForms] = useState>({}); - const [fundingForm, setFundingForm] = useState({ walletTypeId: 2, amount: '', notes: '' }); + const [fundingForm, setFundingForm] = useState({ + walletTypeId: 0, + amountUsdt: '', + notes: '', + }); const [confirmFunding, setConfirmFunding] = useState<{ id: string; txId: string } | null>(null); const [pendingMsg, setPendingMsg] = useState(null); + const [fundingError, setFundingError] = useState(null); const overviewQ = useQuery({ queryKey: ['admin-treasury-overview'], @@ -130,6 +219,31 @@ export function TreasuryAdminPage() { }, }); + const overview = overviewQ.data; + const assets = overview?.assets ?? []; + const walletById = useMemo(() => { + const map = new Map(); + for (const a of assets) map.set(a.walletType.id, a.walletType); + return map; + }, [assets]); + + useEffect(() => { + if (!assets.length || fundingForm.walletTypeId) return; + const preferred = + assets.find((a) => a.walletType.code === 'USDT_BEP20' && a.coldWallet) ?? + assets.find((a) => a.coldWallet) ?? + assets[0]; + if (preferred) { + setFundingForm((f) => ({ ...f, walletTypeId: preferred.walletType.id })); + } + }, [assets, fundingForm.walletTypeId]); + + const selectedFundingAsset = assets.find((a) => a.walletType.id === fundingForm.walletTypeId); + const fundingDecimals = selectedFundingAsset?.walletType.decimals ?? 18; + const fundingRawPreview = fundingForm.amountUsdt.trim() + ? humanAmountToRaw(fundingForm.amountUsdt, fundingDecimals) + : '0'; + const setColdMut = useMutation({ mutationFn: (body: { walletTypeId: number; address: string; label?: string }) => api.post('/api/v1/admin/treasury/cold-wallets', body), @@ -153,7 +267,8 @@ export function TreasuryAdminPage() { onSuccess: (res) => { setPendingMsg(res.data.message ?? t('admin.treasury.fundingPending')); void qc.invalidateQueries({ queryKey: ['admin-treasury-overview'] }); - setFundingForm((f) => ({ ...f, amount: '', notes: '' })); + setFundingForm((f) => ({ ...f, amountUsdt: '', notes: '' })); + setFundingError(null); }, }); @@ -166,7 +281,23 @@ export function TreasuryAdminPage() { }, }); - const overview = overviewQ.data; + const submitFunding = () => { + setFundingError(null); + if (!fundingForm.walletTypeId) { + setFundingError(t('admin.treasury.fundingSelectNetwork')); + return; + } + const raw = humanAmountToRaw(fundingForm.amountUsdt, fundingDecimals); + if (raw === '0') { + setFundingError(t('admin.treasury.invalidAmount')); + return; + } + void requestFundingMut.mutateAsync({ + walletTypeId: fundingForm.walletTypeId, + amount: raw, + notes: fundingForm.notes || undefined, + }); + }; return ( @@ -184,6 +315,10 @@ export function TreasuryAdminPage() { } /> + + {t('admin.treasury.pageIntro')} + + {pendingMsg && ( setPendingMsg(null)} sx={{ mb: 2 }}> {pendingMsg} @@ -197,7 +332,7 @@ export function TreasuryAdminPage() { )} {overview && ( - + {overview.recentPendingSweeps > 0 && ( - + )} {overview.recentFailedSweeps > 0 && ( - + )} @@ -219,293 +360,512 @@ export function TreasuryAdminPage() { {t('admin.treasury.sweepDisabledHint')} )} - {t('admin.treasury.gasHint')} + + {t('admin.treasury.gasHint')} + - {overview.assets.map((asset) => { - const wt = asset.walletType; - const form = coldForms[wt.id] ?? { - address: asset.coldWallet?.address ?? '', - label: asset.coldWallet?.label ?? '', - }; - const nativeDec = asset.nativeDecimals ?? 18; - const hotExplorer = asset.hotWallet?.address - ? explorerUrl(wt.network, asset.hotWallet.address) - : null; - return ( - - - - {wt.name} ({wt.network}) - - - - {t('admin.treasury.coldOnChain', { - address: asset.coldWallet?.address ?? '—', - balance: formatRaw(asset.coldOnChainBalance, wt.decimals), - })} - - {asset.nativeSymbol && asset.coldWallet?.address && ( - - {t('admin.treasury.coldGasOnChain', { - symbol: asset.nativeSymbol, - balance: formatRaw(asset.coldNativeBalance, nativeDec), - })} + {/* Network balances */} + + {assets.map((asset) => { + const wt = asset.walletType; + const form = coldForms[wt.id] ?? { + address: asset.coldWallet?.address ?? '', + label: asset.coldWallet?.label ?? '', + }; + const nativeDec = asset.nativeDecimals ?? 18; + const coldBal = asset.coldOnChainBalance + ? `${rawToHuman(asset.coldOnChainBalance, wt.decimals)} USDT` + : '—'; + const hotBal = asset.hotOnChainBalance + ? `${rawToHuman(asset.hotOnChainBalance, wt.decimals)} USDT` + : '—'; + + return ( + + + + + {wt.name} - )} - - {t('admin.treasury.hotOnChain', { - address: asset.hotWallet?.address ?? '—', - balance: formatRaw(asset.hotOnChainBalance, wt.decimals), - })} - - {asset.nativeSymbol && asset.hotWallet?.address && ( - - - {t('admin.treasury.hotGasOnChain', { - symbol: asset.nativeSymbol, - balance: formatRaw(asset.hotNativeBalance, nativeDec), - })} + + + + + + + {t('admin.treasury.coldWallet')} - {asset.hotNativeOk === true && ( - - )} - {asset.hotNativeOk === false && ( - + {coldBal} + + + {asset.nativeSymbol && asset.coldWallet?.address && ( + + {t('admin.treasury.gasBalance', { symbol: asset.nativeSymbol, + balance: rawToHuman(asset.coldNativeBalance ?? '0', nativeDec), })} - /> + )} - {hotExplorer && ( - + + {t('admin.treasury.gasBalance', { + symbol: asset.nativeSymbol, + balance: rawToHuman(asset.hotNativeBalance ?? '0', nativeDec), + })} + + {asset.hotNativeOk === true && ( + + )} + {asset.hotNativeOk === false && ( + + )} + )} - - )} - - - + + + + + {t('admin.treasury.configureCold')} + + + + setColdForms((prev) => ({ + ...prev, + [wt.id]: { ...form, address: e.target.value }, + })) + } + /> + + setColdForms((prev) => ({ + ...prev, + [wt.id]: { ...form, label: e.target.value }, + })) + } + sx={{ minWidth: { sm: 140 } }} + /> + + + + + + + ); + })} + + + {/* Cold → Hot */} + + + + + + {t('admin.treasury.fundingTitle')} + + + + {t('admin.treasury.fundingSubtitle')} + + + + + {t('admin.treasury.fundingSteps')} + + + + {t('admin.treasury.network')} + + + setFundingForm((f) => ({ ...f, amountUsdt: e.target.value }))} + placeholder="0.50" + InputProps={{ + endAdornment: USDT, + }} + helperText={ + fundingRawPreview !== '0' + ? t('admin.treasury.amountRawPreview', { + raw: fundingRawPreview, + decimals: fundingDecimals, + }) + : t('admin.treasury.amountUsdtHint') + } + sx={{ minWidth: { xs: '100%', md: 180 } }} + /> + setFundingForm((f) => ({ ...f, notes: e.target.value }))} + /> + + - - - - - ); - })} + + + {fundingError && ( + setFundingError(null)}> + {fundingError} + + )} + {selectedFundingAsset?.coldWallet && selectedFundingAsset.hotWallet && ( + + {t('admin.treasury.fundingRoute', { + from: shortAddress(selectedFundingAsset.coldWallet.address), + to: shortAddress(selectedFundingAsset.hotWallet.address), + })} + + )} + + + {overview.pendingColdToHotFunding.length ? ( + + + + + {t('admin.treasury.network')} + {t('admin.treasury.amount')} + {t('admin.treasury.fromTo')} + + + + + {overview.pendingColdToHotFunding.map((f) => { + const wt = walletById.get(f.walletTypeId); + const dec = wt?.decimals ?? 18; + return ( + + {wt ? networkLabel(wt.network) : f.walletTypeId} + + {rawToHuman(f.amount, dec)} USDT + + + {shortAddress(f.fromAddress)} → {shortAddress(f.toAddress)} + + + + + + ); + })} + +
+
+ ) : ( + + {t('admin.treasury.noPendingFunding')} + + )} + + + + {/* Sweeps */} + + + + + + {t('admin.treasury.sweepsTitle')} + + + {t('admin.treasury.sweepsSubtitle')} + + + + + + + + + + + + {t('admin.treasury.status')} + {t('admin.treasury.network')} + {t('admin.treasury.amount')} + {t('admin.treasury.toCold')} + {t('admin.treasury.tx')} + + + + {(sweepsQ.data ?? []).length === 0 ? ( + + + + {t('admin.treasury.noSweeps')} + + + + ) : ( + (sweepsQ.data ?? []).map((s) => { + const wt = walletById.get(s.walletTypeId); + const dec = wt?.decimals ?? 18; + const net = wt?.network ?? 'BSC'; + const txHref = s.blockchainTxId ? txExplorerUrl(net, s.blockchainTxId) : null; + return ( + + + + + {wt ? networkLabel(wt.network) : '—'} + + {rawToHuman(s.amount, dec)} USDT + + + {shortAddress(s.toColdAddress)} + + + {txHref && s.blockchainTxId ? ( + + {shortAddress(s.blockchainTxId, 8, 6)} + + ) : ( + (s.errorMessage ?? '—') + )} + + + ); + }) + )} + +
+
+ + + }> + + {t('admin.treasury.advancedDetails')} + + + + + {t('admin.treasury.advancedDetailsHint')} + + + + + + {t('admin.treasury.status')} + {t('admin.treasury.amountRawCol')} + {t('admin.treasury.toCold')} + {t('admin.treasury.tx')} + + + + {(sweepsQ.data ?? []).map((s) => ( + + {s.status} + + {s.amount} + + + {s.toColdAddress} + + + {s.blockchainTxId ?? s.errorMessage ?? '—'} + + + ))} + +
+
+
+
+
+
)} - - - - {t('admin.treasury.fundingTitle')} - - - {t('admin.treasury.fundingSubtitle')} - - + + setConfirmFunding(null)} maxWidth="sm" fullWidth> + {t('admin.treasury.confirmDialogTitle')} + + + {t('admin.treasury.confirmDialogHint')} + - setFundingForm((f) => ({ ...f, walletTypeId: Number(e.target.value) })) - } - /> - setFundingForm((f) => ({ ...f, amount: e.target.value }))} - /> - setFundingForm((f) => ({ ...f, notes: e.target.value }))} + label={t('admin.treasury.blockchainTxId')} + margin="dense" + value={confirmFunding?.txId ?? ''} + onChange={(e) => + setConfirmFunding((c) => (c ? { ...c, txId: e.target.value } : null)) + } + placeholder="0x…" /> - + + + - - - {overview?.pendingColdToHotFunding?.length ? ( - - - - - {t('admin.treasury.amount')} - {t('admin.treasury.fromTo')} - - - - - {overview.pendingColdToHotFunding.map((f) => ( - - {f.amount} - - {f.fromAddress} → {f.toAddress} - - - - - - ))} - -
-
- ) : ( - - {t('admin.treasury.noPendingFunding')} - - )} -
-
- - - - - - {t('admin.treasury.sweepsTitle')} - - - - - - - - - - {t('admin.treasury.status')} - {t('admin.treasury.amount')} - {t('admin.treasury.toCold')} - {t('admin.treasury.tx')} - - - - {(sweepsQ.data ?? []).map((s) => ( - - - - - {s.amount} - - {s.toColdAddress} - - - {s.blockchainTxId ?? s.errorMessage ?? '—'} - - - ))} - -
-
-
-
- - - setConfirmFunding(null)} maxWidth="sm" fullWidth> - {t('admin.treasury.confirmDialogTitle')} - - - setConfirmFunding((c) => (c ? { ...c, txId: e.target.value } : null)) - } - /> - - - - - - + + ); diff --git a/prediqo_web/src/shared/i18n/locales/en.ts b/prediqo_web/src/shared/i18n/locales/en.ts index 6644b756..adfaf132 100644 --- a/prediqo_web/src/shared/i18n/locales/en.ts +++ b/prediqo_web/src/shared/i18n/locales/en.ts @@ -1527,6 +1527,8 @@ export const en = { title: 'Treasury', refresh: 'Refresh treasury', loadError: 'Failed to load treasury overview.', + pageIntro: + 'Manage cold storage, deposit sweeps, and hot-wallet funding. Work in USDT — the platform handles chain decimals and raw units.', sweepsEnabled: 'Sweeps enabled', sweepsDisabled: 'Sweeps disabled', withdrawalsOn: 'Withdrawals on', @@ -1535,39 +1537,60 @@ export const en = { failedSweeps: '{{count}} failed sweeps', sweepDisabledHint: 'Set SWEEP_ENABLED=true in the VPS .env (wired via docker-compose), recreate the backend container, then save a cold wallet address below. New deposits enqueue sweeps automatically; approve batches under Approvals.', - coldOnChain: 'Cold: {{address}} · USDT {{balance}}', - hotOnChain: 'Hot: {{address}} · USDT {{balance}}', - coldGasOnChain: 'Cold gas ({{symbol}}): {{balance}}', - hotGasOnChain: 'Hot gas ({{symbol}}): {{balance}}', + coldWallet: 'Cold wallet', + hotWallet: 'Hot wallet', + address: 'Address', + copyAddress: 'Copy address', + gasBalance: 'Gas ({{symbol}}): {{balance}}', gasOk: 'enough for withdrawals', gasLow: 'below min {{min}} {{symbol}} — top up before withdrawals', gasHint: 'Native gas (BNB / TRX) is not a platform ledger balance. It stays on the hot wallet on-chain and is checked live before each withdrawal. History: use the explorer link.', - viewOnExplorer: 'View on explorer', + viewOnExplorer: 'Explorer', + configureCold: 'Configure cold address', coldAddress: 'Cold wallet address', label: 'Label', saveCold: 'Save cold', fundingTitle: 'Cold → Hot funding', fundingSubtitle: - 'Create a request, transfer manually from cold wallet, then confirm with the blockchain transaction ID.', - walletTypeId: 'Wallet type ID (1=TRC20, 2=BEP20 typically)', - amountRaw: 'Amount (raw units: TRC20 6 dec, BEP20 18 dec)', + 'Request approval, send USDT manually from cold to hot, then confirm with the blockchain transaction ID.', + fundingSteps: '1) Request · 2) Approve · 3) Transfer on-chain · 4) Confirm tx', + network: 'Network', + amountUsdt: 'Amount', + amountUsdtHint: 'Enter a human amount, e.g. 0.50', + amountRawPreview: 'On-chain units: {{raw}} ({{decimals}} decimals)', + fundingSelectNetwork: 'Select a network', + invalidAmount: 'Enter a valid USDT amount greater than zero', + fundingRoute: 'Route: {{from}} → {{to}}', notes: 'Notes', - requestFunding: 'Request funding for approval', + requestFunding: 'Request funding', amount: 'Amount', fromTo: 'From → To', confirmTx: 'Confirm tx', noPendingFunding: 'No pending funding requests.', sweepsTitle: 'Deposit sweeps', + sweepsSubtitle: 'Moves USDT from user deposit addresses to cold storage after approval.', submitSweeps: 'Submit sweeps for approval', + noSweeps: 'No sweeps yet.', status: 'Status', toCold: 'To cold', tx: 'Tx', + advancedDetails: 'Advanced — raw units & full addresses', + advancedDetailsHint: 'Technical values used on-chain and in the database.', + amountRawCol: 'Amount (raw)', confirmDialogTitle: 'Confirm cold → hot transfer', + confirmDialogHint: 'Paste the blockchain transaction hash after you sent USDT from cold to hot.', blockchainTxId: 'Blockchain transaction ID', sweepPending: 'Sweep batch(es) submitted — approve under Approvals to broadcast USDT to cold.', fundingPending: 'Funding request submitted — pending super-admin approval', + // legacy keys kept for safety + coldOnChain: 'Cold: {{address}} · USDT {{balance}}', + hotOnChain: 'Hot: {{address}} · USDT {{balance}}', + coldGasOnChain: 'Cold gas ({{symbol}}): {{balance}}', + hotGasOnChain: 'Hot gas ({{symbol}}): {{balance}}', + walletTypeId: 'Network', + amountRaw: 'Amount (USDT)', }, security: { title: 'Security', diff --git a/prediqo_web/src/shared/i18n/locales/fr.ts b/prediqo_web/src/shared/i18n/locales/fr.ts index 9fc48685..76a94f0f 100644 --- a/prediqo_web/src/shared/i18n/locales/fr.ts +++ b/prediqo_web/src/shared/i18n/locales/fr.ts @@ -1543,6 +1543,8 @@ export const fr = { title: 'Trésorerie', refresh: 'Actualiser la trésorerie', loadError: 'Impossible de charger la vue d’ensemble trésorerie.', + pageIntro: + 'Gérez le cold storage, les sweeps de dépôts et l’alimentation du hot wallet. Travaillez en USDT — la plateforme gère décimales et unités on-chain.', sweepsEnabled: 'Sweeps activés', sweepsDisabled: 'Sweeps désactivés', withdrawalsOn: 'Retraits activés', @@ -1551,39 +1553,60 @@ export const fr = { failedSweeps: '{{count}} sweep(s) échoué(s)', sweepDisabledHint: 'Définissez SWEEP_ENABLED=true dans le .env VPS (passé via docker-compose), recréez le conteneur backend, puis enregistrez une adresse cold ci-dessous. Les nouveaux dépôts enfilent un sweep ; approuvez les lots sous Approvals.', - coldOnChain: 'Cold : {{address}} · USDT {{balance}}', - hotOnChain: 'Hot : {{address}} · USDT {{balance}}', - coldGasOnChain: 'Gas cold ({{symbol}}) : {{balance}}', - hotGasOnChain: 'Gas hot ({{symbol}}) : {{balance}}', + coldWallet: 'Cold wallet', + hotWallet: 'Hot wallet', + address: 'Adresse', + copyAddress: 'Copier l’adresse', + gasBalance: 'Gas ({{symbol}}) : {{balance}}', gasOk: 'suffisant pour les retraits', gasLow: 'sous le minimum {{min}} {{symbol}} — rechargez avant les retraits', gasHint: 'Le gas natif (BNB / TRX) n’est pas un solde ledger Prediqo. Il reste on-chain sur le hot wallet et est vérifié en direct avant chaque retrait. Historique : lien explorateur.', - viewOnExplorer: 'Voir sur l’explorateur', + viewOnExplorer: 'Explorateur', + configureCold: 'Configurer l’adresse cold', coldAddress: 'Adresse cold wallet', label: 'Libellé', saveCold: 'Enregistrer cold', fundingTitle: 'Alimentation Cold → Hot', fundingSubtitle: - 'Créez une demande, transférez manuellement depuis le cold wallet, puis confirmez avec l’ID de transaction blockchain.', - walletTypeId: 'ID type wallet (1=TRC20, 2=BEP20 en général)', - amountRaw: 'Montant (unités brutes : TRC20 6 déc., BEP20 18 déc.)', + 'Demandez l’approbation, envoyez l’USDT manuellement du cold vers le hot, puis confirmez avec l’ID de transaction blockchain.', + fundingSteps: '1) Demande · 2) Approbation · 3) Transfert on-chain · 4) Confirmer la tx', + network: 'Réseau', + amountUsdt: 'Montant', + amountUsdtHint: 'Saisissez un montant lisible, ex. 0.50', + amountRawPreview: 'Unités on-chain : {{raw}} ({{decimals}} décimales)', + fundingSelectNetwork: 'Sélectionnez un réseau', + invalidAmount: 'Saisissez un montant USDT valide supérieur à zéro', + fundingRoute: 'Parcours : {{from}} → {{to}}', notes: 'Notes', - requestFunding: 'Demander un financement (approbation)', + requestFunding: 'Demander le financement', amount: 'Montant', fromTo: 'De → Vers', confirmTx: 'Confirmer tx', noPendingFunding: 'Aucune demande de financement en attente.', sweepsTitle: 'Sweeps de dépôts', + sweepsSubtitle: 'Déplace l’USDT des adresses de dépôt utilisateur vers le cold après approbation.', submitSweeps: 'Soumettre les sweeps pour approbation', + noSweeps: 'Aucun sweep pour le moment.', status: 'Statut', toCold: 'Vers cold', tx: 'Tx', + advancedDetails: 'Avancé — unités brutes et adresses complètes', + advancedDetailsHint: 'Valeurs techniques utilisées on-chain et en base.', + amountRawCol: 'Montant (brut)', confirmDialogTitle: 'Confirmer le transfert cold → hot', + confirmDialogHint: + 'Collez le hash de transaction après avoir envoyé l’USDT du cold vers le hot.', blockchainTxId: 'ID transaction blockchain', sweepPending: 'Lot(s) de sweep soumis — approuvez sous Approvals pour diffuser l’USDT vers le cold.', fundingPending: 'Demande de financement soumise — en attente d’approbation super-admin', + coldOnChain: 'Cold : {{address}} · USDT {{balance}}', + hotOnChain: 'Hot : {{address}} · USDT {{balance}}', + coldGasOnChain: 'Gas cold ({{symbol}}) : {{balance}}', + hotGasOnChain: 'Gas hot ({{symbol}}) : {{balance}}', + walletTypeId: 'Réseau', + amountRaw: 'Montant (USDT)', }, security: { title: 'Sécurité',