From 0ec67800c78892874cc8af8e4d5c870b3a7c1be2 Mon Sep 17 00:00:00 2001 From: Yannick1712 <52333989+Yannick1712@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:46:43 +0100 Subject: [PATCH 1/5] [NOTASK] add DataRequest SupportIssueReason --- .../supporting/support-issue/entities/support-issue.entity.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/subdomains/supporting/support-issue/entities/support-issue.entity.ts b/src/subdomains/supporting/support-issue/entities/support-issue.entity.ts index 9dd7b7542..a680a145e 100644 --- a/src/subdomains/supporting/support-issue/entities/support-issue.entity.ts +++ b/src/subdomains/supporting/support-issue/entities/support-issue.entity.ts @@ -24,6 +24,7 @@ export enum SupportIssueType { export enum SupportIssueReason { OTHER = 'Other', + DATA_REQUEST = 'DataRequest', // transaction FUNDS_NOT_RECEIVED = 'FundsNotReceived', From fdd1d4591f958deecadc7e311fbddce49d9c2623 Mon Sep 17 00:00:00 2001 From: Yannick1712 <52333989+Yannick1712@users.noreply.github.com> Date: Mon, 30 Dec 2024 17:14:45 +0100 Subject: [PATCH 2/5] [NOTASK] remove unused code --- .../supporting/payin/entities/crypto-input.entity.ts | 7 ------- src/subdomains/supporting/payin/services/payin.service.ts | 8 -------- 2 files changed, 15 deletions(-) diff --git a/src/subdomains/supporting/payin/entities/crypto-input.entity.ts b/src/subdomains/supporting/payin/entities/crypto-input.entity.ts index cb0b05da0..38c739c0d 100644 --- a/src/subdomains/supporting/payin/entities/crypto-input.entity.ts +++ b/src/subdomains/supporting/payin/entities/crypto-input.entity.ts @@ -189,13 +189,6 @@ export class CryptoInput extends IEntity { return this; } - fail(purpose: PayInPurpose): this { - this.purpose = purpose; - this.status = PayInStatus.FAILED; - - return this; - } - ignore(purpose: PayInPurpose, route: DepositRouteType): this { this.purpose = purpose; this.route = route; diff --git a/src/subdomains/supporting/payin/services/payin.service.ts b/src/subdomains/supporting/payin/services/payin.service.ts index 034135794..ae05552ee 100644 --- a/src/subdomains/supporting/payin/services/payin.service.ts +++ b/src/subdomains/supporting/payin/services/payin.service.ts @@ -161,14 +161,6 @@ export class PayInService { await this.payInRepository.save(payIn); } - async failedPayIn(payIn: CryptoInput, purpose: PayInPurpose): Promise { - const _payIn = await this.payInRepository.findOneBy({ id: payIn.id }); - - _payIn.fail(purpose); - - await this.payInRepository.save(_payIn); - } - async ignorePayIn(payIn: CryptoInput, purpose: PayInPurpose, route: DepositRouteType): Promise { const _payIn = await this.payInRepository.findOneBy({ id: payIn.id }); From 80e837cb6942a9b0c1275192dfc45183e71438ec Mon Sep 17 00:00:00 2001 From: Yannick1712 <52333989+Yannick1712@users.noreply.github.com> Date: Tue, 31 Dec 2024 01:12:49 +0100 Subject: [PATCH 3/5] [NOTASK] Improve kyc ident check --- src/subdomains/generic/kyc/services/kyc.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/subdomains/generic/kyc/services/kyc.service.ts b/src/subdomains/generic/kyc/services/kyc.service.ts index bfaa11e4f..dfaf76ba5 100644 --- a/src/subdomains/generic/kyc/services/kyc.service.ts +++ b/src/subdomains/generic/kyc/services/kyc.service.ts @@ -891,7 +891,8 @@ export class KycService { if (!Util.isSameName(identStep.userData.firstname, data.firstname)) errors.push(KycError.FIRST_NAME_NOT_MATCHING); if ( !Util.isSameName(identStep.userData.surname, data.lastname) && - !Util.isSameName(identStep.userData.surname, data.birthname) + !Util.isSameName(identStep.userData.surname, data.birthname) && + (data.lastname || !Util.isSameName(identStep.userData.surname, data.firstname)) ) errors.push(KycError.LAST_NAME_NOT_MATCHING); From 654a2002453bf204d990a8d0e4637be7e91ec28a Mon Sep 17 00:00:00 2001 From: Yannick1712 <52333989+Yannick1712@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:14:09 +0100 Subject: [PATCH 4/5] [NOTASK] Fix kyc ident reversedName check --- src/subdomains/generic/kyc/services/kyc.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/subdomains/generic/kyc/services/kyc.service.ts b/src/subdomains/generic/kyc/services/kyc.service.ts index dfaf76ba5..e4955dd0b 100644 --- a/src/subdomains/generic/kyc/services/kyc.service.ts +++ b/src/subdomains/generic/kyc/services/kyc.service.ts @@ -899,7 +899,8 @@ export class KycService { if ( (Util.isSameName(identStep.userData.firstname, data.lastname) || Util.isSameName(identStep.userData.firstname, data.birthname)) && - Util.isSameName(identStep.userData.surname, data.firstname) + Util.isSameName(identStep.userData.surname, data.firstname) && + errors.some((e) => [KycError.FIRST_NAME_NOT_MATCHING, KycError.LAST_NAME_NOT_MATCHING].includes(e)) ) errors.push(KycError.REVERSED_NAMES); From 81d6adb78bcc244d1c9b18f351b03bb64bd04fbe Mon Sep 17 00:00:00 2001 From: Yannick1712 <52333989+Yannick1712@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:23:36 +0100 Subject: [PATCH 5/5] [NOTASK] Improve bankData verification --- .../generic/user/models/bank-data/bank-data.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subdomains/generic/user/models/bank-data/bank-data.service.ts b/src/subdomains/generic/user/models/bank-data/bank-data.service.ts index 1d6706e24..eafe82f61 100644 --- a/src/subdomains/generic/user/models/bank-data/bank-data.service.ts +++ b/src/subdomains/generic/user/models/bank-data/bank-data.service.ts @@ -76,7 +76,7 @@ export class BankDataService { if ([BankDataType.IDENT, BankDataType.USER].includes(entity.type)) return; const existing = await this.bankDataRepo.findOne({ - where: { iban: entity.iban, approved: true }, + where: { id: Not(entity.id), iban: entity.iban, approved: true }, relations: { userData: true }, });