Skip to content

Commit

Permalink
fix: Allow medium confidence checks for vpn eligibility
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Nov 26, 2024
1 parent be30c5f commit 55027e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/datasources/locking-api/fingerprint-api.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand All @@ -252,7 +252,7 @@ describe('FingerprintApiService', () => {
expect(result).toEqual({
requestId: eligibilityRequest.requestId,
isAllowed: expect.anything(),
isVpn: false,
isVpn: true,
});
});

Expand Down
3 changes: 2 additions & 1 deletion src/datasources/locking-api/fingerprint-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
);
}
}

0 comments on commit 55027e9

Please sign in to comment.