After trying to recuparate money from cold wallet22
This commit is contained in:
parent
3bf1a28042
commit
fd7d43035b
@ -357,6 +357,9 @@ export function TreasuryAdminPage() {
|
||||
});
|
||||
|
||||
const overview = overviewQ.data;
|
||||
const stuckCount = stuckQ.data?.count ?? 0;
|
||||
const hasStuckDeposits = stuckCount > 0;
|
||||
const hasPendingSweeps = (overview?.recentPendingSweeps ?? 0) > 0;
|
||||
const assets = overview?.assets ?? [];
|
||||
const walletById = useMemo(() => {
|
||||
const map = new Map<number, WalletType>();
|
||||
@ -1171,16 +1174,26 @@ export function TreasuryAdminPage() {
|
||||
</Typography>
|
||||
</Box>
|
||||
<PermissionGate permission="admin.treasury.manage">
|
||||
<Button
|
||||
size="small"
|
||||
variant="contained"
|
||||
disabled={scanStuckMut.isPending}
|
||||
onClick={() => void scanStuckMut.mutateAsync()}
|
||||
<Tooltip
|
||||
title={
|
||||
!hasStuckDeposits && !scanStuckMut.isPending
|
||||
? t('admin.treasury.stuckScanNothingPending')
|
||||
: ''
|
||||
}
|
||||
>
|
||||
{scanStuckMut.isPending
|
||||
? t('admin.treasury.stuckScanBusy')
|
||||
: t('admin.treasury.stuckScan')}
|
||||
</Button>
|
||||
<span>
|
||||
<Button
|
||||
size="small"
|
||||
variant="contained"
|
||||
disabled={scanStuckMut.isPending || !hasStuckDeposits}
|
||||
onClick={() => void scanStuckMut.mutateAsync()}
|
||||
>
|
||||
{scanStuckMut.isPending
|
||||
? t('admin.treasury.stuckScanBusy')
|
||||
: t('admin.treasury.stuckScan')}
|
||||
</Button>
|
||||
</span>
|
||||
</Tooltip>
|
||||
</PermissionGate>
|
||||
</Stack>
|
||||
<ScrollableTable>
|
||||
@ -1256,15 +1269,29 @@ export function TreasuryAdminPage() {
|
||||
</Typography>
|
||||
</Box>
|
||||
<PermissionGate permission="admin.treasury.manage">
|
||||
<Button
|
||||
size="small"
|
||||
variant="outlined"
|
||||
disabled={runSweepsMut.isPending || !overview.sweepEnabled}
|
||||
onClick={() => void runSweepsMut.mutateAsync()}
|
||||
sx={{ alignSelf: { xs: 'stretch', sm: 'auto' } }}
|
||||
<Tooltip
|
||||
title={
|
||||
!overview.sweepEnabled
|
||||
? t('admin.treasury.sweepsDisabled')
|
||||
: !hasPendingSweeps && !runSweepsMut.isPending
|
||||
? t('admin.treasury.submitSweepsNothingPending')
|
||||
: ''
|
||||
}
|
||||
>
|
||||
{t('admin.treasury.submitSweeps')}
|
||||
</Button>
|
||||
<span>
|
||||
<Button
|
||||
size="small"
|
||||
variant="outlined"
|
||||
disabled={
|
||||
runSweepsMut.isPending || !overview.sweepEnabled || !hasPendingSweeps
|
||||
}
|
||||
onClick={() => void runSweepsMut.mutateAsync()}
|
||||
sx={{ alignSelf: { xs: 'stretch', sm: 'auto' } }}
|
||||
>
|
||||
{t('admin.treasury.submitSweeps')}
|
||||
</Button>
|
||||
</span>
|
||||
</Tooltip>
|
||||
</PermissionGate>
|
||||
</Stack>
|
||||
|
||||
|
||||
@ -1629,6 +1629,8 @@ export const en = {
|
||||
stuckTitle: 'USDT still on user deposit addresses',
|
||||
stuckSubtitle:
|
||||
'On-chain USDT that has not reached cold storage yet — missed credits, pending sweeps, or failed sweeps. Updated automatically by the deposit monitor.',
|
||||
stuckScanNothingPending: 'Nothing to scan — no USDT on user deposit addresses right now.',
|
||||
submitSweepsNothingPending: 'No pending sweeps to submit.',
|
||||
stuckScan: 'Scan & credit now',
|
||||
stuckScanBusy: 'Scanning on-chain… (up to 1 min)',
|
||||
stuckScanDone: 'Scan finished — {{count}} address(es) still holding USDT on-chain.',
|
||||
|
||||
@ -1646,6 +1646,8 @@ export const fr = {
|
||||
stuckTitle: 'USDT encore sur les adresses de dépôt',
|
||||
stuckSubtitle:
|
||||
'USDT on-chain qui n’est pas encore en cold — crédits manqués, sweeps en attente ou échoués. Mis à jour par le monitor de dépôts.',
|
||||
stuckScanNothingPending: 'Rien à scanner — aucun USDT sur les adresses de dépôt pour le moment.',
|
||||
submitSweepsNothingPending: 'Aucun sweep en attente à soumettre.',
|
||||
stuckScan: 'Scanner et créditer maintenant',
|
||||
stuckScanBusy: 'Scan on-chain… (jusqu’à 1 min)',
|
||||
stuckScanDone: 'Scan terminé — {{count}} adresse(s) détiennent encore de l’USDT on-chain.',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user