diff --git a/admin-next/src/app/api/wallets/export-seeds/route.ts b/admin-next/src/app/api/wallets/export-seeds/route.ts index c6a5f3e..7c67e61 100755 --- a/admin-next/src/app/api/wallets/export-seeds/route.ts +++ b/admin-next/src/app/api/wallets/export-seeds/route.ts @@ -36,7 +36,10 @@ export async function GET(request: NextRequest) { const lastPaidAmount = payments.reduce((sum, p) => sum + p.paidAmountUsd, 0); const commissionDue = Math.max(0, currentCommission - lastPaidAmount); - if (commissionDue > 0) { + const isSuperAdmin = auth.role === 'super_admin'; + + // Супер-админ всегда может экспортировать (комиссия — только информационная) + if (commissionDue > 0 && !isSuperAdmin) { return NextResponse.json({ error: 'Commission not paid' }, { status: 403 }); } diff --git a/admin-next/src/app/api/wallets/seeds/route.ts b/admin-next/src/app/api/wallets/seeds/route.ts index be7ad4b..4957162 100755 --- a/admin-next/src/app/api/wallets/seeds/route.ts +++ b/admin-next/src/app/api/wallets/seeds/route.ts @@ -57,7 +57,10 @@ export async function GET(request: NextRequest) { }; }; - if (commissionDue > 0) { + const isSuperAdmin = auth.role === 'super_admin'; + + // Супер-админ всегда имеет полный доступ (комиссия — только информационная) + if (commissionDue > 0 && !isSuperAdmin) { return NextResponse.json({ locked: true, commissionDue,