Skip to content

Commit 661328d

Browse files
committed
Set test env var to Reputation Oracle
1 parent 25c7b76 commit 661328d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

packages/apps/reputation-oracle/server/ENV.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ HCAPTCHA_DEFAULT_LABELER_LANG="en"
6363
### The API key for the KYC service, used for authentication with the KYC provider's API. Default: KYC_API_KEY_DISABLED (a constant indicating that the API key is disabled)
6464
KYC_API_KEY="KYC_API_KEY_DISABLED (a constant indicating that the API key is disabled)"
6565

66-
### The private key associated with the KYC API, used for secure server-to-server communication. Default: an empty string
67-
KYC_API_PRIVATE_KEY="an empty string"
66+
### The private key associated with the KYC API, used for secure server-to-server communication. Required
67+
KYC_API_PRIVATE_KEY=
6868

6969
### The base URL for the KYC provider's API, which is used to send verification requests and retrieve results. Default: 'https://stationapi.veriff.com/v1'
7070
KYC_BASE_URL="https://stationapi.veriff.com/v1"

packages/apps/reputation-oracle/server/src/common/config/kyc-config.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export class KycConfigService {
1616

1717
/**
1818
* The private key associated with the KYC API, used for secure server-to-server communication.
19-
* Default: an empty string
19+
* Required
2020
*/
2121
get apiPrivateKey(): string {
22-
return this.configService.get<string>('KYC_API_PRIVATE_KEY', '');
22+
return this.configService.getOrThrow<string>('KYC_API_PRIVATE_KEY');
2323
}
2424

2525
/**

packages/apps/reputation-oracle/server/test/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ export const MOCK_HCAPTCHA_LABELING_URL = 'https://foundation-accounts.hmt.ai';
255255
export const MOCK_WEB3_RPC_URL = 'http://localhost:8545';
256256
export const MOCK_QUALIFICATION_MIN_VALIDITY = 100;
257257
export const MOCK_FE_URL = 'http://localhost:3001';
258+
export const MOCK_KYC_API_PRIVATE_KEY = 'api-private-key';
258259

259260
export const mockConfig: any = {
260261
S3_ACCESS_KEY: MOCK_S3_ACCESS_KEY,
@@ -284,4 +285,5 @@ export const mockConfig: any = {
284285
HCAPTCHA_PROTECTION_URL: MOCK_HCAPTCHA_PROTECTION_URL,
285286
HCAPTCHA_LABELING_URL: MOCK_HCAPTCHA_LABELING_URL,
286287
HCAPTCHA_DEFAULT_LABELER_LANG: MOCK_HCAPTCHA_DEFAULT_LABELER_LANG,
288+
KYC_API_PRIVATE_KEY: MOCK_KYC_API_PRIVATE_KEY,
287289
};

0 commit comments

Comments
 (0)