diff --git a/src/subdomains/generic/kyc/services/kyc.service.ts b/src/subdomains/generic/kyc/services/kyc.service.ts index bfaa11e4f..e4955dd0b 100644 --- a/src/subdomains/generic/kyc/services/kyc.service.ts +++ b/src/subdomains/generic/kyc/services/kyc.service.ts @@ -891,14 +891,16 @@ 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); 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); 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 }, }); 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 }); 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',