From 55027e9eb338f7b568bcf1b9dbbb5009d1279649 Mon Sep 17 00:00:00 2001 From: Usame Algan Date: Tue, 26 Nov 2024 14:07:49 +0100 Subject: [PATCH] fix: Allow medium confidence checks for vpn eligibility --- src/datasources/locking-api/fingerprint-api.service.spec.ts | 4 ++-- src/datasources/locking-api/fingerprint-api.service.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/datasources/locking-api/fingerprint-api.service.spec.ts b/src/datasources/locking-api/fingerprint-api.service.spec.ts index 338b535b67..a05cbbf06b 100644 --- a/src/datasources/locking-api/fingerprint-api.service.spec.ts +++ b/src/datasources/locking-api/fingerprint-api.service.spec.ts @@ -234,7 +234,7 @@ describe('FingerprintApiService', () => { }); }); - it('should return isVpn:false for a medium confidence score', async () => { + it('should return isVpn:true for a medium confidence score', async () => { const eligibilityRequest = eligibilityRequestBuilder().build(); const unsealedData = fingerprintUnsealedDataBuilder() .with('products', { @@ -252,7 +252,7 @@ describe('FingerprintApiService', () => { expect(result).toEqual({ requestId: eligibilityRequest.requestId, isAllowed: expect.anything(), - isVpn: false, + isVpn: true, }); }); diff --git a/src/datasources/locking-api/fingerprint-api.service.ts b/src/datasources/locking-api/fingerprint-api.service.ts index 7c3a788292..0369506272 100644 --- a/src/datasources/locking-api/fingerprint-api.service.ts +++ b/src/datasources/locking-api/fingerprint-api.service.ts @@ -77,7 +77,8 @@ export class FingerprintApiService implements IIdentityApi { private isVpn(unsealedData: FingerprintUnsealedData): boolean { return ( unsealedData.products.vpn?.data?.result === true && - unsealedData.products.vpn?.data?.confidence === 'high' + (unsealedData.products.vpn?.data?.confidence === 'medium' || + unsealedData.products.vpn?.data?.confidence === 'high') ); } }