= 0 ? 'done' : '')}/>
= 1 ? 'done' : '')}/>
= 2 ? 'done' : '')}/>
{step === 0 && (
<>
How much would you like to deposit?
setAmount(Number(e.target.value.replace(/[^0-9.]/g, '')) || 0)}/>
{presets.map(p => (
))}
>
)}
{step === 1 && (
<>
Send USDT to this address
Send exactly the amount shown. Admin will check the Bybit wallet and approve once your transfer settles.
Network
USDT · {info?.network || '—'}
Deposit address
{info?.address ? (
{info.address}
) : (
Not configured. Contact admin to set DEPOSIT_ADDRESS in Settings.
)}
Amount{USD(amount)}
Reference{reference}
{error &&
{error}
}
>
)}
{step === 2 && (
Submitted for review
We'll confirm your deposit of {USD(amount)} after the on-chain transfer settles.
)}
Before you transfer
- Use USDT on the TRC20 network (fastest, lowest fee).
- Include the reference code in the transfer note.
- Funds are credited at the next NAV calculation after confirmation.
>
);
}
/* ---------- KYC ---------- */
function KYC({ onStatusChange }) {
const [statusData, { reload }] = useApi('/api/auth/kyc/status');
const [step, setStep] = React.useState(0);
const [name, setName] = React.useState('');
const [ktp, setKtp] = React.useState('');
const [submitting, setSubmitting] = React.useState(false);
const [error, setError] = React.useState(null);
const submit = async () => {
setSubmitting(true); setError(null);
try {
console.log("Submitting KYC with:", { name, ktp });
console.log("reload function type:", typeof reload);
await api.post('/api/auth/kyc', { full_name: name, ktp_number: ktp });
console.log("KYC post success. Calling reload...");
if (typeof reload === 'function') {
reload();
} else {
console.warn("reload is not a function!");
}
console.log("Calling onStatusChange...");
try {
if (typeof onStatusChange === 'function') onStatusChange();
} catch (cbErr) {
console.warn("onStatusChange callback threw, ignoring:", cbErr);
}
setStep(2);
} catch (e) {
console.error("Caught error in KYC submit:", e);
// Coerce any shape (TypeError, FastAPI error, array of validation errors)
// to a string. Previously e.stack could be a long stack trace dumped
// into the red box; here we prefer the readable detail/message.
const msg = (e && (e.detail || e.message)) || (typeof e === 'string' ? e : null) || 'Submit failed';
setError(String(msg));
}
setSubmitting(false);
};
const status = statusData?.status;
const isDone = status === 'approved' || status === 'pending';
return (
<>
Identity verification
Complete your KYC
{status &&
{status}}
{isDone && status === 'approved' && (
KYC verified
You're fully verified — invest without limits.
)}
{status === 'pending' && (
Under review
Submitted — typically reviewed within 24 hours.
)}
{!isDone && (
Personal details
{status === 'rejected' && statusData?.rejection_reason && (
Previous submission rejected: {statusData.rejection_reason}
)}
{error &&
{error}
}
Why we need this
Aeizch is a Closed User Group. KYC ensures every member is an invited individual and helps us comply with Indonesian financial regulations.
Your data, encrypted
Stored encrypted; only accessed during review.
)}
>
);
}
Object.assign(window, { Sidebar, Dashboard, BotsList, BotDetail, History, Deposit, KYC, colorFor, emojiFor });