diff --git a/indexer/packages/postgres/src/db/migrations/migration_files/20240613174832_add_gb_to_compliance_reasons.ts b/indexer/packages/postgres/src/db/migrations/migration_files/20240613174832_add_gb_to_compliance_reasons.ts new file mode 100644 index 0000000000..c83af715f3 --- /dev/null +++ b/indexer/packages/postgres/src/db/migrations/migration_files/20240613174832_add_gb_to_compliance_reasons.ts @@ -0,0 +1,19 @@ +import * as Knex from 'knex'; + +import { formatAlterTableEnumSql } from '../helpers'; + +export async function up(knex: Knex): Promise { + return knex.raw(formatAlterTableEnumSql( + 'compliance_status', + 'reason', + ['MANUAL', 'US_GEO', 'CA_GEO', 'GB_GEO', 'SANCTIONED_GEO', 'COMPLIANCE_PROVIDER'], + )); +} + +export async function down(knex: Knex): Promise { + return knex.raw(formatAlterTableEnumSql( + 'compliance_status', + 'reason', + ['MANUAL', 'US_GEO', 'CA_GEO', 'SANCTIONED_GEO', 'COMPLIANCE_PROVIDER'], + )); +} diff --git a/indexer/packages/postgres/src/types/compliance-status-types.ts b/indexer/packages/postgres/src/types/compliance-status-types.ts index 2c2927da2f..e5099ff073 100644 --- a/indexer/packages/postgres/src/types/compliance-status-types.ts +++ b/indexer/packages/postgres/src/types/compliance-status-types.ts @@ -6,6 +6,7 @@ export enum ComplianceReason { MANUAL = 'MANUAL', US_GEO = 'US_GEO', CA_GEO = 'CA_GEO', + GB_GEO = 'GB_GEO', SANCTIONED_GEO = 'SANCTIONED_GEO', COMPLIANCE_PROVIDER = 'COMPLIANCE_PROVIDER', } diff --git a/indexer/services/comlink/public/api-documentation.md b/indexer/services/comlink/public/api-documentation.md index 5ba0f86b23..6341cfa62b 100644 --- a/indexer/services/comlink/public/api-documentation.md +++ b/indexer/services/comlink/public/api-documentation.md @@ -3575,6 +3575,7 @@ This operation does not require authentication |*anonymous*|MANUAL| |*anonymous*|US_GEO| |*anonymous*|CA_GEO| +|*anonymous*|GB_GEO| |*anonymous*|SANCTIONED_GEO| |*anonymous*|COMPLIANCE_PROVIDER| diff --git a/indexer/services/comlink/public/swagger.json b/indexer/services/comlink/public/swagger.json index e3109df206..a4016b7206 100644 --- a/indexer/services/comlink/public/swagger.json +++ b/indexer/services/comlink/public/swagger.json @@ -350,6 +350,7 @@ "MANUAL", "US_GEO", "CA_GEO", + "GB_GEO", "SANCTIONED_GEO", "COMPLIANCE_PROVIDER" ], diff --git a/indexer/services/comlink/src/helpers/compliance/compliance-utils.ts b/indexer/services/comlink/src/helpers/compliance/compliance-utils.ts index 7aead50b20..09d25949e0 100644 --- a/indexer/services/comlink/src/helpers/compliance/compliance-utils.ts +++ b/indexer/services/comlink/src/helpers/compliance/compliance-utils.ts @@ -10,6 +10,8 @@ export function getGeoComplianceReason( return ComplianceReason.US_GEO; } else if (country === 'CA') { return ComplianceReason.CA_GEO; + } else if (country === 'GB') { + return ComplianceReason.GB_GEO; } else { return ComplianceReason.SANCTIONED_GEO; }