Category: Compliance - Bug
Priority: High
Estimated Time: 2 hours
Description:
app/(app)/withdraw/page.tsx loads balances and renders the cash-out form with no check against the merchant's KYC status. A freshly-created account with kyc_status: 'pending' can immediately submit a withdrawal. types/kyc.ts already defines KycStatus and related types, and the existing Me interface in lib/api.ts returns merchant_id — extending it to include kyc_status is the minimal required backend change.
Tasks:
- Extend
Me interface in lib/api.ts with kyc_status: KycStatus | null
- Load
me data at the top of WithdrawPage (alongside existing balances fetch)
- If
kyc_status !== 'approved', render a gated banner with a link to the KYC flow instead of the form
- Add tests covering the blocked and unblocked render paths
Category: Compliance - Bug
Priority: High
Estimated Time: 2 hours
Description:
app/(app)/withdraw/page.tsxloads balances and renders the cash-out form with no check against the merchant's KYC status. A freshly-created account withkyc_status: 'pending'can immediately submit a withdrawal.types/kyc.tsalready definesKycStatusand related types, and the existingMeinterface inlib/api.tsreturnsmerchant_id— extending it to includekyc_statusis the minimal required backend change.Tasks:
Meinterface inlib/api.tswithkyc_status: KycStatus | nullmedata at the top ofWithdrawPage(alongside existing balances fetch)kyc_status !== 'approved', render a gated banner with a link to the KYC flow instead of the form