Skip to content

Commit

Permalink
limit only 2 approval notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
rappix committed Aug 6, 2024
1 parent 08ca86d commit 7c0e453
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/routes/ccMarketplace/kyc/kyc-approval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ router.post('/webhook/kyc-approval', async (req: Request, res: Response) => {

const { user_id, level } = data;

if(!['basic', 'plus'].includes(level)) {
logger.alert('Invalid KYC level. Skip this notification.')
return
}

const all_kyc = await prisma.kYC.findMany({
where: {
FractalId: user_id
Expand Down Expand Up @@ -151,6 +156,7 @@ router.post('/webhook/kyc-approval', async (req: Request, res: Response) => {
return
}


const call = existingLevel >= 1 ? 'modifyMember' : 'addMember'

// save on blockchain
Expand Down

0 comments on commit 7c0e453

Please sign in to comment.