diff --git a/indexer/services/comlink/__tests__/lib/compliance-and-geo-check.test.ts b/indexer/services/comlink/__tests__/lib/compliance-and-geo-check.test.ts index d154d32c9a..3dfb5ee95f 100644 --- a/indexer/services/comlink/__tests__/lib/compliance-and-geo-check.test.ts +++ b/indexer/services/comlink/__tests__/lib/compliance-and-geo-check.test.ts @@ -189,6 +189,26 @@ describe('compliance-check', () => { }); }); + it.each([ + ['query', `/v4/check-compliance-query?address=${testConstants.defaultAddress}`], + ['param', `/v4/check-compliance-param/${testConstants.defaultAddress}`], + ])('does not return 403 if address in request is in FIRST_STRIKE_CLOSE_ONLY and from restricted country (%s)', async ( + _name: string, + path: string, + ) => { + isRestrictedCountrySpy.mockReturnValueOnce(true); + await ComplianceStatusTable.create({ + ...testConstants.compliantStatusData, + status: ComplianceStatus.FIRST_STRIKE_CLOSE_ONLY, + }); + await sendRequestToApp({ + type: RequestMethod.GET, + path, + expressApp: complianceCheckApp, + expectedStatus: 200, + }); + }); + it.each([ ['query', `/v4/check-compliance-query?address=${testConstants.defaultAddress}`], ['param', `/v4/check-compliance-param/${testConstants.defaultAddress}`], diff --git a/indexer/services/comlink/src/lib/compliance-and-geo-check.ts b/indexer/services/comlink/src/lib/compliance-and-geo-check.ts index bee0a96900..983fb1b872 100644 --- a/indexer/services/comlink/src/lib/compliance-and-geo-check.ts +++ b/indexer/services/comlink/src/lib/compliance-and-geo-check.ts @@ -47,7 +47,9 @@ export async function complianceAndGeoCheck( { readReplica: true }, ); if (updatedStatus.length > 0) { - if (updatedStatus[0].status === ComplianceStatus.CLOSE_ONLY) { + if (updatedStatus[0].status === ComplianceStatus.CLOSE_ONLY || + updatedStatus[0].status === ComplianceStatus.FIRST_STRIKE_CLOSE_ONLY + ) { return next(); } else if (updatedStatus[0].status === ComplianceStatus.BLOCKED) { return create4xxResponse(