Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/subdomains/generic/kyc/services/kyc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,18 @@ export class KycService {
if (approvalStep?.isOnHold) {
await this.kycStepRepo.update(...approvalStep.manualReview());
} else if (!approvalStep) {
const newStep = await this.initiateStep(kycStep.userData, KycStepName.DFX_APPROVAL);
await this.kycStepRepo.update(...newStep.manualReview());
const newStep = await this.initiateStep(kycStep.userData, KycStepName.DFX_APPROVAL).catch((e) => {
if (e.message.includes('Cannot insert duplicate key'))
return this.kycStepRepo.findOneBy({
name: KycStepName.DFX_APPROVAL,
status: ReviewStatus.ON_HOLD,
userData: { id: kycStep.userData.id },
});

throw e;
});

if (newStep) await this.kycStepRepo.update(...newStep.manualReview());
}
}
}
Expand Down
Loading